UNPKG

jcc-solidity-utils

Version:
1,117 lines (1,116 loc) 315 kB
{ "contractName": "AddressUtils", "abi": [], "metadata": "{\"compiler\":{\"version\":\"0.4.24+commit.e67f0147\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/utils/AddressUtils.sol\":\"AddressUtils\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/utils/AddressUtils.sol\":{\"keccak256\":\"0xe78f03563026c72cf447b8ce7839eb34f512b4698e52253da52d568094f20c89\",\"urls\":[\"bzzr://15282c513ef8c6bb7000a0abf864675306e22ec0425639eb0f0c1f91bb2a4b92\"]}},\"version\":1}", "bytecode": "0x604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a72305820ff98d4053989dcb7b7a9459b0f94f439dd501a1998ed694d850f477cfee3b3ce0029", "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fd00a165627a7a72305820ff98d4053989dcb7b7a9459b0f94f439dd501a1998ed694d850f477cfee3b3ce0029", "sourceMap": "93:1886:31:-;;132:2:-1;166:7;155:9;146:7;137:37;252:7;246:14;243:1;238:23;232:4;229:33;270:1;265:20;;;;222:63;;265:20;274:9;222:63;;298:9;295:1;288:20;328:4;319:7;311:22;352:7;343;336:24", "deployedSourceMap": "93:1886:31:-;;;;;;;;", "source": "pragma solidity >=0.4.24;\n\n/**\n * @dev Utility library of inline functions on addresses.\n */\nlibrary AddressUtils {\n /**\n * @dev Returns whether the target address is a contract.\n * @param _addr Address to check.\n */\n function isContract(address _addr) internal view returns (bool) {\n uint256 size;\n\n /**\n * XXX Currently there is no better way to check if there is a contract in an address than to\n * check the size of the code at that address.\n * See https://ethereum.stackexchange.com/a/14016/36603 for more details about how this works.\n * TODO: Check this again before the Serenity release, because all addresses will be\n * contracts then.\n */\n assembly {\n size := extcodesize(_addr)\n } // solium-disable-line security/no-inline-assembly\n return size > 0;\n }\n\n function isZeroAddress(address _addr) internal pure returns (bool) {\n return _addr == address(0);\n }\n\n // 使用toString,因为js重载导致无法正常执行\n function getString(address _addr) internal pure returns (string memory) {\n bytes32 value = bytes32(uint256(_addr));\n bytes memory alphabet = \"0123456789abcdef\";\n\n bytes memory str = new bytes(42);\n str[0] = \"0\";\n str[1] = \"x\";\n for (uint256 i = 0; i < 20; i++) {\n str[2 + i * 2] = alphabet[uint256(uint8(value[i + 12] >> 4))];\n str[3 + i * 2] = alphabet[uint256(uint8(value[i + 12] & 0x0f))];\n }\n\n return string(str);\n }\n\n function fromString(address _addr, string memory _str)\n internal\n pure\n returns (address)\n {\n bytes memory b = bytes(_str);\n\n uint256 result = 0;\n for (uint256 i = 0; i < b.length; i++) {\n uint256 c = uint256(uint8(b[i]));\n if (c >= 48 && c <= 57) {\n result = result * 16 + (c - 48);\n }\n if (c >= 65 && c <= 90) {\n result = result * 16 + (c - 55);\n }\n if (c >= 97 && c <= 122) {\n result = result * 16 + (c - 87);\n }\n }\n\n return address(result);\n }\n}\n", "sourcePath": "/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/utils/AddressUtils.sol", "ast": { "absolutePath": "/Users/chtian/Documents/01_work/01_develope/jcc/jcc-solidity-utils/contracts/utils/AddressUtils.sol", "exportedSymbols": { "AddressUtils": [ 6969 ] }, "id": 6970, "nodeType": "SourceUnit", "nodes": [ { "id": 6732, "literals": [ "solidity", ">=", "0.4", ".24" ], "nodeType": "PragmaDirective", "src": "0:25:31" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "library", "documentation": "@dev Utility library of inline functions on addresses.", "fullyImplemented": true, "id": 6969, "linearizedBaseContracts": [ 6969 ], "name": "AddressUtils", "nodeType": "ContractDefinition", "nodes": [ { "body": { "id": 6747, "nodeType": "Block", "src": "290:526:31", "statements": [ { "assignments": [], "declarations": [ { "constant": false, "id": 6740, "name": "size", "nodeType": "VariableDeclaration", "scope": 6748, "src": "296:12:31", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 6739, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "296:7:31", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 6741, "initialValue": null, "nodeType": "VariableDeclarationStatement", "src": "296:12:31" }, { "externalReferences": [ { "_addr": { "declaration": 6734, "isOffset": false, "isSlot": false, "src": "728:5:31", "valueSize": 1 } }, { "size": { "declaration": 6740, "isOffset": false, "isSlot": false, "src": "708:4:31", "valueSize": 1 } } ], "id": 6742, "nodeType": "InlineAssembly", "operations": "{\n size := extcodesize(_addr)\n}", "src": "691:111:31" }, { "expression": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 6745, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 6743, "name": "size", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6740, "src": "803:4:31", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 6744, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "810:1:31", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "803:8:31", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "functionReturnParameters": 6738, "id": 6746, "nodeType": "Return", "src": "796:15:31" } ] }, "documentation": "@dev Returns whether the target address is a contract.\n@param _addr Address to check.", "id": 6748, "implemented": true, "isConstructor": false, "isDeclaredConst": true, "modifiers": [], "name": "isContract", "nodeType": "FunctionDefinition", "parameters": { "id": 6735, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 6734, "name": "_addr", "nodeType": "VariableDeclaration", "scope": 6748, "src": "246:13:31", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 6733, "name": "address", "nodeType": "ElementaryTypeName", "src": "246:7:31", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "245:15:31" }, "payable": false, "returnParameters": { "id": 6738, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 6737, "name": "", "nodeType": "VariableDeclaration", "scope": 6748, "src": "284:4:31", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 6736, "name": "bool", "nodeType": "ElementaryTypeName", "src": "284:4:31", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "283:6:31" }, "scope": 6969, "src": "226:590:31", "stateMutability": "view", "superFunction": null, "visibility": "internal" }, { "body": { "id": 6761, "nodeType": "Block", "src": "887:37:31", "statements": [ { "expression": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 6759, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 6755, "name": "_addr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6750, "src": "900:5:31", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "30", "id": 6757, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "917:1:31", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" } ], "id": 6756, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "909:7:31", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": "address" }, "id": 6758, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "909:10:31", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "900:19:31", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "functionReturnParameters": 6754, "id": 6760, "nodeType": "Return", "src": "893:26:31" } ] }, "documentation": null, "id": 6762, "implemented": true, "isConstructor": false, "isDeclaredConst": true, "modifiers": [], "name": "isZeroAddress", "nodeType": "FunctionDefinition", "parameters": { "id": 6751, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 6750, "name": "_addr", "nodeType": "VariableDeclaration", "scope": 6762, "src": "843:13:31", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 6749, "name": "address", "nodeType": "ElementaryTypeName", "src": "843:7:31", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "842:15:31" }, "payable": false, "returnParameters": { "id": 6754, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 6753, "name": "", "nodeType": "VariableDeclaration", "scope": 6762, "src": "881:4:31", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 6752, "name": "bool", "nodeType": "ElementaryTypeName", "src": "881:4:31", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "880:6:31" }, "scope": 6969, "src": "820:104:31", "stateMutability": "pure", "superFunction": null, "visibility": "internal" }, { "body": { "id": 6860, "nodeType": "Block", "src": "1061:383:31", "statements": [ { "assignments": [ 6770 ], "declarations": [ { "constant": false, "id": 6770, "name": "value", "nodeType": "VariableDeclaration", "scope": 6861, "src": "1067:13:31", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 6769, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "1067:7:31", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "value": null, "visibility": "internal" } ], "id": 6776, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 6773, "name": "_addr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6764, "src": "1099:5:31", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 6772, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1091:7:31", "typeDescriptions": { "typeIdentifier": "t_type$_t_uint256_$", "typeString": "type(uint256)" }, "typeName": "uint256" }, "id": 6774, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1091:14:31", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 6771, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1083:7:31", "typeDescriptions": { "typeIdentifier": "t_type$_t_bytes32_$", "typeString": "type(bytes32)" }, "typeName": "bytes32" }, "id": 6775, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1083:23:31", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "nodeType": "VariableDeclarationStatement", "src": "1067:39:31" }, { "assignments": [ 6778 ], "declarations": [ { "constant": false, "id": 6778, "name": "alphabet", "nodeType": "VariableDeclaration", "scope": 6861, "src": "1112:21:31", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 6777, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "1112:5:31", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": null, "visibility": "internal" } ], "id": 6780, "initialValue": { "argumentTypes": null, "hexValue": "30313233343536373839616263646566", "id": 6779, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1136:18:31", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_cb29997ed99ead0db59ce4d12b7d3723198c827273e5796737c926d78019c39f", "typeString": "literal_string \"0123456789abcdef\"" }, "value": "0123456789abcdef" }, "nodeType": "VariableDeclarationStatement", "src": "1112:42:31" }, { "assignments": [ 6782 ], "declarations": [ { "constant": false, "id": 6782, "name": "str", "nodeType": "VariableDeclaration", "scope": 6861, "src": "1161:16:31", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 6781, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "1161:5:31", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": null, "visibility": "internal" } ], "id": 6787, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "3432", "id": 6785, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1190:2:31", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_42_by_1", "typeString": "int_const 42" }, "value": "42" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_rational_42_by_1", "typeString": "int_const 42" } ], "id": 6784, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "NewExpression", "src": "1180:9:31", "typeDescriptions": { "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_bytes_memory_$", "typeString": "function (uint256) pure returns (bytes memory)" }, "typeName": { "id": 6783, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "1184:5:31", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } } }, "id": 6786, "isConstant": false, "isLValue": false, "isPure": true, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1180:13:31", "typeDescriptions": { "typeIdentifier": "t_bytes_memory", "typeString": "bytes memory" } }, "nodeType": "VariableDeclarationStatement", "src": "1161:32:31" }, { "expression": { "argumentTypes": null, "id": 6792, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 6788, "name": "str", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6782, "src": "1199:3:31", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, "id": 6790, "indexExpression": { "argumentTypes": null, "hexValue": "30", "id": 6789, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1203:1:31", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "1199:6:31", "typeDescriptions": { "typeIdentifier": "t_bytes1", "typeString": "bytes1" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "hexValue": "30", "id": 6791, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1208:3:31", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_044852b2a670ade5407e78fb2863c51de9fcb96542a07186fe3aeda6bb8a116d", "typeString": "literal_string \"0\"" }, "value": "0" }, "src": "1199:12:31", "typeDescriptions": { "typeIdentifier": "t_bytes1", "typeString": "bytes1" } }, "id": 6793, "nodeType": "ExpressionStatement", "src": "1199:12:31" }, { "expression": { "argumentTypes": null, "id": 6798, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 6794, "name": "str", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6782, "src": "1217:3:31", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, "id": 6796, "indexExpression": { "argumentTypes": null, "hexValue": "31", "id": 6795, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1221:1:31", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", "typeString": "int_const 1" }, "value": "1" }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "1217:6:31", "typeDescriptions": { "typeIdentifier": "t_bytes1", "typeString": "bytes1" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "hexValue": "78", "id": 6797, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1226:3:31", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_7521d1cadbcfa91eec65aa16715b94ffc1c9654ba57ea2ef1a2127bca1127a83", "typeString": "literal_string \"x\"" }, "value": "x" }, "src": "1217:12:31", "typeDescriptions": { "typeIdentifier": "t_bytes1", "typeString": "bytes1" } }, "id": 6799, "nodeType": "ExpressionStatement", "src": "1217:12:31" }, { "body": { "id": 6854, "nodeType": "Block", "src": "1268:147:31", "statements": [ { "expression": { "argumentTypes": null, "id": 6830, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 6810, "name": "str", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6782, "src": "1276:3:31", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, "id": 6816, "indexExpression": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 6815, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "hexValue": "32", "id": 6811, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1280:1:31", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_2_by_1", "typeString": "int_const 2" }, "value": "2" }, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 6814, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 6812, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6801, "src": "1284:1:31", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "*", "rightExpression": { "argumentTypes": null, "hexValue": "32", "id": 6813, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1288:1:31", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_2_by_1", "typeString": "int_const 2" }, "value": "2" }, "src": "1284:5:31", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1280:9:31", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "1276:14:31", "typeDescriptions": { "typeIdentifier": "t_bytes1", "typeString": "bytes1" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 6817, "name": "alphabet", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6778, "src": "1293:8:31", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes memory" } }, "id": 6829, "indexExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_bytes1", "typeString": "bytes1" }, "id": 6826, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 6820, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6770, "src": "1316:5:31", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "id": 6824, "indexExpression": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 6823, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 6821, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 6801, "src": "1322:1:31", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "+", "rightExpression": { "argumentTypes": null, "hexValue": "3132", "id": 6822, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1326:2:31", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_12_by_1", "typeString": "int_const 12" }, "value": "12" }, "src": "1322:6:31", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "isConstant": false, "isLValue": false,