UNPKG

tokenboost-solidity

Version:
865 lines 39.3 kB
{ "contractName": "StringUtils", "abi": [], "bytecode": "0x604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a723058207529c71014af1f5b0015e0fb3ea16fab4955519751780728ada8fb3c365180720029", "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fd00a165627a7a723058207529c71014af1f5b0015e0fb3ea16fab4955519751780728ada8fb3c365180720029", "sourceMap": "51:212:21:-;;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": "51:212:21:-;;;;;;;;", "source": "pragma solidity ^0.4.24;\n\nimport \"./strings.sol\";\n\nlibrary StringUtils {\n using strings for *;\n\n function quoted(string _string) internal pure returns (string) {\n return '\"'.toSlice().concat(_string.toSlice()).toSlice().concat('\"'.toSlice());\n }\n}", "sourcePath": "/Users/yoonjae/SolidityProjects/tokenboost-solidity/contracts/utils/StringUtils.sol", "ast": { "absolutePath": "/Users/yoonjae/SolidityProjects/tokenboost-solidity/contracts/utils/StringUtils.sol", "exportedSymbols": { "StringUtils": [ 2415 ] }, "id": 2416, "nodeType": "SourceUnit", "nodes": [ { "id": 2387, "literals": [ "solidity", "^", "0.4", ".24" ], "nodeType": "PragmaDirective", "src": "0:24:21" }, { "absolutePath": "/Users/yoonjae/SolidityProjects/tokenboost-solidity/contracts/utils/strings.sol", "file": "./strings.sol", "id": 2388, "nodeType": "ImportDirective", "scope": 2416, "sourceUnit": 4202, "src": "26:23:21", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "library", "documentation": null, "fullyImplemented": true, "id": 2415, "linearizedBaseContracts": [ 2415 ], "name": "StringUtils", "nodeType": "ContractDefinition", "nodes": [ { "id": 2390, "libraryName": { "contractScope": null, "id": 2389, "name": "strings", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 4201, "src": "83:7:21", "typeDescriptions": { "typeIdentifier": "t_contract$_strings_$4201", "typeString": "library strings" } }, "nodeType": "UsingForDirective", "src": "77:20:21", "typeName": null }, { "body": { "id": 2413, "nodeType": "Block", "src": "166:95:21", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "expression": { "argumentTypes": null, "hexValue": "22", "id": 2408, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "240:3:21", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_6e9f33448a4153023cdaf3eb759f1afdc24aba433a3e18b683f8c04a6eaa69f0", "typeString": "literal_string \"\"\"" }, "value": "\"" }, "id": 2409, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "toSlice", "nodeType": "MemberAccess", "referencedDeclaration": 2573, "src": "240:11:21", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$_t_struct$_slice_$2513_memory_ptr_$bound_to$_t_string_memory_ptr_$", "typeString": "function (string memory) pure returns (struct strings.slice memory)" } }, "id": 2410, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "240:13:21", "typeDescriptions": { "typeIdentifier": "t_struct$_slice_$2513_memory_ptr", "typeString": "struct strings.slice memory" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_struct$_slice_$2513_memory_ptr", "typeString": "struct strings.slice memory" } ], "expression": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "expression": { "argumentTypes": null, "id": 2401, "name": "_string", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2392, "src": "204:7:21", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, "id": 2402, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "toSlice", "nodeType": "MemberAccess", "referencedDeclaration": 2573, "src": "204:15:21", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$_t_struct$_slice_$2513_memory_ptr_$bound_to$_t_string_memory_ptr_$", "typeString": "function (string memory) pure returns (struct strings.slice memory)" } }, "id": 2403, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "204:17:21", "typeDescriptions": { "typeIdentifier": "t_struct$_slice_$2513_memory_ptr", "typeString": "struct strings.slice memory" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_struct$_slice_$2513_memory_ptr", "typeString": "struct strings.slice memory" } ], "expression": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "expression": { "argumentTypes": null, "hexValue": "22", "id": 2397, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "183:3:21", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_6e9f33448a4153023cdaf3eb759f1afdc24aba433a3e18b683f8c04a6eaa69f0", "typeString": "literal_string \"\"\"" }, "value": "\"" }, "id": 2398, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "toSlice", "nodeType": "MemberAccess", "referencedDeclaration": 2573, "src": "183:11:21", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$_t_struct$_slice_$2513_memory_ptr_$bound_to$_t_string_memory_ptr_$", "typeString": "function (string memory) pure returns (struct strings.slice memory)" } }, "id": 2399, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "183:13:21", "typeDescriptions": { "typeIdentifier": "t_struct$_slice_$2513_memory_ptr", "typeString": "struct strings.slice memory" } }, "id": 2400, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "concat", "nodeType": "MemberAccess", "referencedDeclaration": 4086, "src": "183:20:21", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_struct$_slice_$2513_memory_ptr_$_t_struct$_slice_$2513_memory_ptr_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_slice_$2513_memory_ptr_$", "typeString": "function (struct strings.slice memory,struct strings.slice memory) pure returns (string memory)" } }, "id": 2404, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "183:39:21", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, "id": 2405, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "toSlice", "nodeType": "MemberAccess", "referencedDeclaration": 2573, "src": "183:47:21", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$_t_struct$_slice_$2513_memory_ptr_$bound_to$_t_string_memory_ptr_$", "typeString": "function (string memory) pure returns (struct strings.slice memory)" } }, "id": 2406, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "183:49:21", "typeDescriptions": { "typeIdentifier": "t_struct$_slice_$2513_memory_ptr", "typeString": "struct strings.slice memory" } }, "id": 2407, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "concat", "nodeType": "MemberAccess", "referencedDeclaration": 4086, "src": "183:56:21", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_struct$_slice_$2513_memory_ptr_$_t_struct$_slice_$2513_memory_ptr_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_slice_$2513_memory_ptr_$", "typeString": "function (struct strings.slice memory,struct strings.slice memory) pure returns (string memory)" } }, "id": 2411, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "183:71:21", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, "functionReturnParameters": 2396, "id": 2412, "nodeType": "Return", "src": "176:78:21" } ] }, "documentation": null, "id": 2414, "implemented": true, "isConstructor": false, "isDeclaredConst": true, "modifiers": [], "name": "quoted", "nodeType": "FunctionDefinition", "parameters": { "id": 2393, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2392, "name": "_string", "nodeType": "VariableDeclaration", "scope": 2414, "src": "119:14:21", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 2391, "name": "string", "nodeType": "ElementaryTypeName", "src": "119:6:21", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" } ], "src": "118:16:21" }, "payable": false, "returnParameters": { "id": 2396, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2395, "name": "", "nodeType": "VariableDeclaration", "scope": 2414, "src": "158:6:21", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 2394, "name": "string", "nodeType": "ElementaryTypeName", "src": "158:6:21", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" } ], "src": "157:8:21" }, "scope": 2415, "src": "103:158:21", "stateMutability": "pure", "superFunction": null, "visibility": "internal" } ], "scope": 2416, "src": "51:212:21" } ], "src": "0:263:21" }, "legacyAST": { "absolutePath": "/Users/yoonjae/SolidityProjects/tokenboost-solidity/contracts/utils/StringUtils.sol", "exportedSymbols": { "StringUtils": [ 2415 ] }, "id": 2416, "nodeType": "SourceUnit", "nodes": [ { "id": 2387, "literals": [ "solidity", "^", "0.4", ".24" ], "nodeType": "PragmaDirective", "src": "0:24:21" }, { "absolutePath": "/Users/yoonjae/SolidityProjects/tokenboost-solidity/contracts/utils/strings.sol", "file": "./strings.sol", "id": 2388, "nodeType": "ImportDirective", "scope": 2416, "sourceUnit": 4202, "src": "26:23:21", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "library", "documentation": null, "fullyImplemented": true, "id": 2415, "linearizedBaseContracts": [ 2415 ], "name": "StringUtils", "nodeType": "ContractDefinition", "nodes": [ { "id": 2390, "libraryName": { "contractScope": null, "id": 2389, "name": "strings", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 4201, "src": "83:7:21", "typeDescriptions": { "typeIdentifier": "t_contract$_strings_$4201", "typeString": "library strings" } }, "nodeType": "UsingForDirective", "src": "77:20:21", "typeName": null }, { "body": { "id": 2413, "nodeType": "Block", "src": "166:95:21", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "expression": { "argumentTypes": null, "hexValue": "22", "id": 2408, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "240:3:21", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_6e9f33448a4153023cdaf3eb759f1afdc24aba433a3e18b683f8c04a6eaa69f0", "typeString": "literal_string \"\"\"" }, "value": "\"" }, "id": 2409, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "toSlice", "nodeType": "MemberAccess", "referencedDeclaration": 2573, "src": "240:11:21", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$_t_struct$_slice_$2513_memory_ptr_$bound_to$_t_string_memory_ptr_$", "typeString": "function (string memory) pure returns (struct strings.slice memory)" } }, "id": 2410, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "240:13:21", "typeDescriptions": { "typeIdentifier": "t_struct$_slice_$2513_memory_ptr", "typeString": "struct strings.slice memory" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_struct$_slice_$2513_memory_ptr", "typeString": "struct strings.slice memory" } ], "expression": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "expression": { "argumentTypes": null, "id": 2401, "name": "_string", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2392, "src": "204:7:21", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, "id": 2402, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "toSlice", "nodeType": "MemberAccess", "referencedDeclaration": 2573, "src": "204:15:21", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$_t_struct$_slice_$2513_memory_ptr_$bound_to$_t_string_memory_ptr_$", "typeString": "function (string memory) pure returns (struct strings.slice memory)" } }, "id": 2403, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "204:17:21", "typeDescriptions": { "typeIdentifier": "t_struct$_slice_$2513_memory_ptr", "typeString": "struct strings.slice memory" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_struct$_slice_$2513_memory_ptr", "typeString": "struct strings.slice memory" } ], "expression": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "expression": { "argumentTypes": null, "hexValue": "22", "id": 2397, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "183:3:21", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_6e9f33448a4153023cdaf3eb759f1afdc24aba433a3e18b683f8c04a6eaa69f0", "typeString": "literal_string \"\"\"" }, "value": "\"" }, "id": 2398, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "toSlice", "nodeType": "MemberAccess", "referencedDeclaration": 2573, "src": "183:11:21", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$_t_struct$_slice_$2513_memory_ptr_$bound_to$_t_string_memory_ptr_$", "typeString": "function (string memory) pure returns (struct strings.slice memory)" } }, "id": 2399, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "183:13:21", "typeDescriptions": { "typeIdentifier": "t_struct$_slice_$2513_memory_ptr", "typeString": "struct strings.slice memory" } }, "id": 2400, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "concat", "nodeType": "MemberAccess", "referencedDeclaration": 4086, "src": "183:20:21", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_struct$_slice_$2513_memory_ptr_$_t_struct$_slice_$2513_memory_ptr_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_slice_$2513_memory_ptr_$", "typeString": "function (struct strings.slice memory,struct strings.slice memory) pure returns (string memory)" } }, "id": 2404, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "183:39:21", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, "id": 2405, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "toSlice", "nodeType": "MemberAccess", "referencedDeclaration": 2573, "src": "183:47:21", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$_t_struct$_slice_$2513_memory_ptr_$bound_to$_t_string_memory_ptr_$", "typeString": "function (string memory) pure returns (struct strings.slice memory)" } }, "id": 2406, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "183:49:21", "typeDescriptions": { "typeIdentifier": "t_struct$_slice_$2513_memory_ptr", "typeString": "struct strings.slice memory" } }, "id": 2407, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "memberName": "concat", "nodeType": "MemberAccess", "referencedDeclaration": 4086, "src": "183:56:21", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_struct$_slice_$2513_memory_ptr_$_t_struct$_slice_$2513_memory_ptr_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_slice_$2513_memory_ptr_$", "typeString": "function (struct strings.slice memory,struct strings.slice memory) pure returns (string memory)" } }, "id": 2411, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "183:71:21", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, "functionReturnParameters": 2396, "id": 2412, "nodeType": "Return", "src": "176:78:21" } ] }, "documentation": null, "id": 2414, "implemented": true, "isConstructor": false, "isDeclaredConst": true, "modifiers": [], "name": "quoted", "nodeType": "FunctionDefinition", "parameters": { "id": 2393, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2392, "name": "_string", "nodeType": "VariableDeclaration", "scope": 2414, "src": "119:14:21", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 2391, "name": "string", "nodeType": "ElementaryTypeName", "src": "119:6:21", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" } ], "src": "118:16:21" }, "payable": false, "returnParameters": { "id": 2396, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2395, "name": "", "nodeType": "VariableDeclaration", "scope": 2414, "src": "158:6:21", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 2394, "name": "string", "nodeType": "ElementaryTypeName", "src": "158:6:21", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" } ], "src": "157:8:21" }, "scope": 2415, "src": "103:158:21", "stateMutability": "pure", "superFunction": null, "visibility": "internal" } ], "scope": 2416, "src": "51:212:21" } ], "src": "0:263:21" }, "compiler": { "name": "solc", "version": "0.4.24+commit.e67f0147.Emscripten.clang" }, "networks": {}, "schemaVersion": "2.0.1", "updatedAt": "2018-09-18T20:04:45.643Z" }