@alpsfinance/core
Version:
This is the official Alps Finance smart contract repository.
1,098 lines • 218 kB
JSON
{
"contractName": "Strings",
"abi": [],
"metadata": "{\"compiler\":{\"version\":\"0.8.11+commit.d7f03943\"},\"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\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/Strings.sol\":{\"keccak256\":\"0x32c202bd28995dd20c4347b7c6467a6d3241c74c8ad3edcbb610cd9205916c45\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8179c356adb19e70d6b31a1eedc8c5c7f0c00e669e2540f4099e3844c6074d30\",\"dweb:/ipfs/QmWFbivarEobbqhS1go64ootVuHfVohBseerYy9FTEd1W2\"]}},\"version\":1}",
"bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220b963d1eeac13be6eb13274bc7c24aaef659bce068306f3218f2ec8001937574464736f6c634300080b0033",
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220b963d1eeac13be6eb13274bc7c24aaef659bce068306f3218f2ec8001937574464736f6c634300080b0033",
"immutableReferences": {},
"generatedSources": [],
"deployedGeneratedSources": [],
"sourceMap": "146:1885:29:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;146:1885:29;;;;;;;;;;;;;;;;;",
"deployedSourceMap": "146:1885:29:-: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": [
5574
]
},
"id": 5575,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 5373,
"literals": [
"solidity",
"^",
"0.8",
".0"
],
"nodeType": "PragmaDirective",
"src": "86:23:29"
},
{
"abstract": false,
"baseContracts": [],
"canonicalName": "Strings",
"contractDependencies": [],
"contractKind": "library",
"documentation": {
"id": 5374,
"nodeType": "StructuredDocumentation",
"src": "111:34:29",
"text": " @dev String operations."
},
"fullyImplemented": true,
"id": 5574,
"linearizedBaseContracts": [
5574
],
"name": "Strings",
"nameLocation": "154:7:29",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": true,
"id": 5377,
"mutability": "constant",
"name": "_HEX_SYMBOLS",
"nameLocation": "193:12:29",
"nodeType": "VariableDeclaration",
"scope": 5574,
"src": "168:58:29",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes16",
"typeString": "bytes16"
},
"typeName": {
"id": 5375,
"name": "bytes16",
"nodeType": "ElementaryTypeName",
"src": "168:7:29",
"typeDescriptions": {
"typeIdentifier": "t_bytes16",
"typeString": "bytes16"
}
},
"value": {
"hexValue": "30313233343536373839616263646566",
"id": 5376,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "208:18:29",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_cb29997ed99ead0db59ce4d12b7d3723198c827273e5796737c926d78019c39f",
"typeString": "literal_string \"0123456789abcdef\""
},
"value": "0123456789abcdef"
},
"visibility": "private"
},
{
"body": {
"id": 5455,
"nodeType": "Block",
"src": "399:632:29",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 5387,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 5385,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5380,
"src": "601:5:29",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"hexValue": "30",
"id": 5386,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "610:1:29",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "601:10:29",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 5391,
"nodeType": "IfStatement",
"src": "597:51:29",
"trueBody": {
"id": 5390,
"nodeType": "Block",
"src": "613:35:29",
"statements": [
{
"expression": {
"hexValue": "30",
"id": 5388,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "634:3:29",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_044852b2a670ade5407e78fb2863c51de9fcb96542a07186fe3aeda6bb8a116d",
"typeString": "literal_string \"0\""
},
"value": "0"
},
"functionReturnParameters": 5384,
"id": 5389,
"nodeType": "Return",
"src": "627:10:29"
}
]
}
},
{
"assignments": [
5393
],
"declarations": [
{
"constant": false,
"id": 5393,
"mutability": "mutable",
"name": "temp",
"nameLocation": "665:4:29",
"nodeType": "VariableDeclaration",
"scope": 5455,
"src": "657:12:29",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5392,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "657:7:29",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 5395,
"initialValue": {
"id": 5394,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5380,
"src": "672:5:29",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "657:20:29"
},
{
"assignments": [
5397
],
"declarations": [
{
"constant": false,
"id": 5397,
"mutability": "mutable",
"name": "digits",
"nameLocation": "695:6:29",
"nodeType": "VariableDeclaration",
"scope": 5455,
"src": "687:14:29",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5396,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "687:7:29",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"id": 5398,
"nodeType": "VariableDeclarationStatement",
"src": "687:14:29"
},
{
"body": {
"id": 5409,
"nodeType": "Block",
"src": "729:57:29",
"statements": [
{
"expression": {
"id": 5403,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "743:8:29",
"subExpression": {
"id": 5402,
"name": "digits",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5397,
"src": "743:6:29",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 5404,
"nodeType": "ExpressionStatement",
"src": "743:8:29"
},
{
"expression": {
"id": 5407,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 5405,
"name": "temp",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5393,
"src": "765:4:29",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "/=",
"rightHandSide": {
"hexValue": "3130",
"id": 5406,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "773:2:29",
"typeDescriptions": {
"typeIdentifier": "t_rational_10_by_1",
"typeString": "int_const 10"
},
"value": "10"
},
"src": "765:10:29",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 5408,
"nodeType": "ExpressionStatement",
"src": "765:10:29"
}
]
},
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 5401,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 5399,
"name": "temp",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5393,
"src": "718:4:29",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"hexValue": "30",
"id": 5400,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "726:1:29",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "718:9:29",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 5410,
"nodeType": "WhileStatement",
"src": "711:75:29"
},
{
"assignments": [
5412
],
"declarations": [
{
"constant": false,
"id": 5412,
"mutability": "mutable",
"name": "buffer",
"nameLocation": "808:6:29",
"nodeType": "VariableDeclaration",
"scope": 5455,
"src": "795:19:29",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 5411,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "795:5:29",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"id": 5417,
"initialValue": {
"arguments": [
{
"id": 5415,
"name": "digits",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5397,
"src": "827:6:29",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 5414,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "NewExpression",
"src": "817:9:29",
"typeDescriptions": {
"typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_bytes_memory_ptr_$",
"typeString": "function (uint256) pure returns (bytes memory)"
},
"typeName": {
"id": 5413,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "821:5:29",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
}
},
"id": 5416,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "817:17:29",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "795:39:29"
},
{
"body": {
"id": 5448,
"nodeType": "Block",
"src": "863:131:29",
"statements": [
{
"expression": {
"id": 5423,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 5421,
"name": "digits",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5397,
"src": "877:6:29",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "-=",
"rightHandSide": {
"hexValue": "31",
"id": 5422,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "887:1:29",
"typeDescriptions": {
"typeIdentifier": "t_rational_1_by_1",
"typeString": "int_const 1"
},
"value": "1"
},
"src": "877:11:29",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 5424,
"nodeType": "ExpressionStatement",
"src": "877:11:29"
},
{
"expression": {
"id": 5442,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"baseExpression": {
"id": 5425,
"name": "buffer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5412,
"src": "902:6:29",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 5427,
"indexExpression": {
"id": 5426,
"name": "digits",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5397,
"src": "909:6:29",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "902:14:29",
"typeDescriptions": {
"typeIdentifier": "t_bytes1",
"typeString": "bytes1"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"arguments": [
{
"arguments": [
{
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 5439,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"hexValue": "3438",
"id": 5432,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "932:2:29",
"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": 5437,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 5435,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5380,
"src": "945:5:29",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "%",
"rightExpression": {
"hexValue": "3130",
"id": 5436,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "953:2:29",
"typeDescriptions": {
"typeIdentifier": "t_rational_10_by_1",
"typeString": "int_const 10"
},
"value": "10"
},
"src": "945:10:29",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 5434,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "937:7:29",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint256_$",
"typeString": "type(uint256)"
},
"typeName": {
"id": 5433,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "937:7:29",
"typeDescriptions": {}
}
},
"id": 5438,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "937:19:29",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "932:24:29",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 5431,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "926:5:29",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_uint8_$",
"typeString": "type(uint8)"
},
"typeName": {
"id": 5430,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "926:5:29",
"typeDescriptions": {}
}
},
"id": 5440,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "926:31:29",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
],
"id": 5429,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "919:6:29",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bytes1_$",
"typeString": "type(bytes1)"
},
"typeName": {
"id": 5428,
"name": "bytes1",
"nodeType": "ElementaryTypeName",
"src": "919:6:29",
"typeDescriptions": {}
}
},
"id": 5441,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "919:39:29",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes1",
"typeString": "bytes1"
}
},
"src": "902:56:29",
"typeDescriptions": {
"typeIdentifier": "t_bytes1",
"typeString": "bytes1"
}
},
"id": 5443,
"nodeType": "ExpressionStatement",
"src": "902:56:29"
},
{
"expression": {
"id": 5446,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 5444,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5380,
"src": "972:5:29",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "/=",
"rightHandSide": {
"hexValue": "3130",
"id": 5445,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "981:2:29",
"typeDescriptions": {
"typeIdentifier": "t_rational_10_by_1",
"typeString": "int_const 10"
},
"value": "10"
},
"src": "972:11:29",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 5447,
"nodeType": "ExpressionStatement",
"src": "972:11:29"
}
]
},
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 5420,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 5418,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5380,
"src": "851:5:29",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"hexValue": "30",
"id": 5419,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "860:1:29",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "851:10:29",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 5449,
"nodeType": "WhileStatement",
"src": "844:150:29"
},
{
"expression": {
"arguments": [
{
"id": 5452,
"name": "buffer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5412,
"src": "1017:6:29",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"id": 5451,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "1010:6:29",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_string_storage_ptr_$",
"typeString": "type(string storage pointer)"
},
"typeName": {
"id": 5450,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "1010:6:29",
"typeDescriptions": {}
}
},
"id": 5453,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1010:14:29",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
},
"functionReturnParameters": 5384,
"id": 5454,
"nodeType": "Return",
"src": "1003:21:29"
}
]
},
"documentation": {
"id": 5378,
"nodeType": "StructuredDocumentation",
"src": "233:90:29",
"text": " @dev Converts a `uint256` to its ASCII `string` decimal representation."
},
"id": 5456,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "toString",
"nameLocation": "337:8:29",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 5381,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5380,
"mutability": "mutable",
"name": "value",
"nameLocation": "354:5:29",
"nodeType": "VariableDeclaration",
"scope": 5456,
"src": "346:13:29",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5379,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "346:7:29",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "345:15:29"
},
"returnParameters": {
"id": 5384,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5383,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 5456,
"src": "384:13:29",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 5382,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "384:6:29",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"visibility": "internal"
}
],
"src": "383:15:29"
},
"scope": 5574,
"src": "328:703:29",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 5496,
"nodeType": "Block",
"src": "1210:255:29",
"statements": [
{
"condition": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 5466,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 5464,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 5