tokenboost-solidity-erc20sale
Version:
Solidity contracts for TokenBoost (ERC20Sale)
865 lines • 39.1 kB
JSON
{
"contractName": "StringUtils",
"abi": [],
"bytecode": "0x604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a72305820dd7393737ff0ec8238baef035b83a43c75a5fd1164863003a16d19d83b22c55b0029",
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fd00a165627a7a72305820dd7393737ff0ec8238baef035b83a43c75a5fd1164863003a16d19d83b22c55b0029",
"sourceMap": "51:212:16:-;;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:16:-;;;;;;;;",
"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": "tokenboost-solidity/contracts/utils/StringUtils.sol",
"ast": {
"absolutePath": "tokenboost-solidity/contracts/utils/StringUtils.sol",
"exportedSymbols": {
"StringUtils": [
2547
]
},
"id": 2548,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 2519,
"literals": [
"solidity",
"^",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:24:16"
},
{
"absolutePath": "tokenboost-solidity/contracts/utils/strings.sol",
"file": "./strings.sol",
"id": 2520,
"nodeType": "ImportDirective",
"scope": 2548,
"sourceUnit": 4334,
"src": "26:23:16",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "library",
"documentation": null,
"fullyImplemented": true,
"id": 2547,
"linearizedBaseContracts": [
2547
],
"name": "StringUtils",
"nodeType": "ContractDefinition",
"nodes": [
{
"id": 2522,
"libraryName": {
"contractScope": null,
"id": 2521,
"name": "strings",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 4333,
"src": "83:7:16",
"typeDescriptions": {
"typeIdentifier": "t_contract$_strings_$4333",
"typeString": "library strings"
}
},
"nodeType": "UsingForDirective",
"src": "77:20:16",
"typeName": null
},
{
"body": {
"id": 2545,
"nodeType": "Block",
"src": "166:95:16",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"hexValue": "22",
"id": 2540,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "240:3:16",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_6e9f33448a4153023cdaf3eb759f1afdc24aba433a3e18b683f8c04a6eaa69f0",
"typeString": "literal_string \"\"\""
},
"value": "\""
},
"id": 2541,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toSlice",
"nodeType": "MemberAccess",
"referencedDeclaration": 2705,
"src": "240:11:16",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$_t_struct$_slice_$2645_memory_ptr_$bound_to$_t_string_memory_ptr_$",
"typeString": "function (string memory) pure returns (struct strings.slice memory)"
}
},
"id": 2542,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "240:13:16",
"typeDescriptions": {
"typeIdentifier": "t_struct$_slice_$2645_memory_ptr",
"typeString": "struct strings.slice memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_slice_$2645_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": 2533,
"name": "_string",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2524,
"src": "204:7:16",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
},
"id": 2534,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toSlice",
"nodeType": "MemberAccess",
"referencedDeclaration": 2705,
"src": "204:15:16",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$_t_struct$_slice_$2645_memory_ptr_$bound_to$_t_string_memory_ptr_$",
"typeString": "function (string memory) pure returns (struct strings.slice memory)"
}
},
"id": 2535,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "204:17:16",
"typeDescriptions": {
"typeIdentifier": "t_struct$_slice_$2645_memory_ptr",
"typeString": "struct strings.slice memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_slice_$2645_memory_ptr",
"typeString": "struct strings.slice memory"
}
],
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"hexValue": "22",
"id": 2529,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "183:3:16",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_6e9f33448a4153023cdaf3eb759f1afdc24aba433a3e18b683f8c04a6eaa69f0",
"typeString": "literal_string \"\"\""
},
"value": "\""
},
"id": 2530,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toSlice",
"nodeType": "MemberAccess",
"referencedDeclaration": 2705,
"src": "183:11:16",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$_t_struct$_slice_$2645_memory_ptr_$bound_to$_t_string_memory_ptr_$",
"typeString": "function (string memory) pure returns (struct strings.slice memory)"
}
},
"id": 2531,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "183:13:16",
"typeDescriptions": {
"typeIdentifier": "t_struct$_slice_$2645_memory_ptr",
"typeString": "struct strings.slice memory"
}
},
"id": 2532,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "concat",
"nodeType": "MemberAccess",
"referencedDeclaration": 4218,
"src": "183:20:16",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_struct$_slice_$2645_memory_ptr_$_t_struct$_slice_$2645_memory_ptr_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_slice_$2645_memory_ptr_$",
"typeString": "function (struct strings.slice memory,struct strings.slice memory) pure returns (string memory)"
}
},
"id": 2536,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "183:39:16",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
},
"id": 2537,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toSlice",
"nodeType": "MemberAccess",
"referencedDeclaration": 2705,
"src": "183:47:16",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$_t_struct$_slice_$2645_memory_ptr_$bound_to$_t_string_memory_ptr_$",
"typeString": "function (string memory) pure returns (struct strings.slice memory)"
}
},
"id": 2538,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "183:49:16",
"typeDescriptions": {
"typeIdentifier": "t_struct$_slice_$2645_memory_ptr",
"typeString": "struct strings.slice memory"
}
},
"id": 2539,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "concat",
"nodeType": "MemberAccess",
"referencedDeclaration": 4218,
"src": "183:56:16",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_struct$_slice_$2645_memory_ptr_$_t_struct$_slice_$2645_memory_ptr_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_slice_$2645_memory_ptr_$",
"typeString": "function (struct strings.slice memory,struct strings.slice memory) pure returns (string memory)"
}
},
"id": 2543,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "183:71:16",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
},
"functionReturnParameters": 2528,
"id": 2544,
"nodeType": "Return",
"src": "176:78:16"
}
]
},
"documentation": null,
"id": 2546,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "quoted",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2525,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2524,
"name": "_string",
"nodeType": "VariableDeclaration",
"scope": 2546,
"src": "119:14:16",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 2523,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "119:6:16",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "118:16:16"
},
"payable": false,
"returnParameters": {
"id": 2528,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2527,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 2546,
"src": "158:6:16",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 2526,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "158:6:16",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "157:8:16"
},
"scope": 2547,
"src": "103:158:16",
"stateMutability": "pure",
"superFunction": null,
"visibility": "internal"
}
],
"scope": 2548,
"src": "51:212:16"
}
],
"src": "0:263:16"
},
"legacyAST": {
"absolutePath": "tokenboost-solidity/contracts/utils/StringUtils.sol",
"exportedSymbols": {
"StringUtils": [
2547
]
},
"id": 2548,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 2519,
"literals": [
"solidity",
"^",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:24:16"
},
{
"absolutePath": "tokenboost-solidity/contracts/utils/strings.sol",
"file": "./strings.sol",
"id": 2520,
"nodeType": "ImportDirective",
"scope": 2548,
"sourceUnit": 4334,
"src": "26:23:16",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "library",
"documentation": null,
"fullyImplemented": true,
"id": 2547,
"linearizedBaseContracts": [
2547
],
"name": "StringUtils",
"nodeType": "ContractDefinition",
"nodes": [
{
"id": 2522,
"libraryName": {
"contractScope": null,
"id": 2521,
"name": "strings",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 4333,
"src": "83:7:16",
"typeDescriptions": {
"typeIdentifier": "t_contract$_strings_$4333",
"typeString": "library strings"
}
},
"nodeType": "UsingForDirective",
"src": "77:20:16",
"typeName": null
},
{
"body": {
"id": 2545,
"nodeType": "Block",
"src": "166:95:16",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"hexValue": "22",
"id": 2540,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "240:3:16",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_6e9f33448a4153023cdaf3eb759f1afdc24aba433a3e18b683f8c04a6eaa69f0",
"typeString": "literal_string \"\"\""
},
"value": "\""
},
"id": 2541,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toSlice",
"nodeType": "MemberAccess",
"referencedDeclaration": 2705,
"src": "240:11:16",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$_t_struct$_slice_$2645_memory_ptr_$bound_to$_t_string_memory_ptr_$",
"typeString": "function (string memory) pure returns (struct strings.slice memory)"
}
},
"id": 2542,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "240:13:16",
"typeDescriptions": {
"typeIdentifier": "t_struct$_slice_$2645_memory_ptr",
"typeString": "struct strings.slice memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_slice_$2645_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": 2533,
"name": "_string",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 2524,
"src": "204:7:16",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
},
"id": 2534,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toSlice",
"nodeType": "MemberAccess",
"referencedDeclaration": 2705,
"src": "204:15:16",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$_t_struct$_slice_$2645_memory_ptr_$bound_to$_t_string_memory_ptr_$",
"typeString": "function (string memory) pure returns (struct strings.slice memory)"
}
},
"id": 2535,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "204:17:16",
"typeDescriptions": {
"typeIdentifier": "t_struct$_slice_$2645_memory_ptr",
"typeString": "struct strings.slice memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_slice_$2645_memory_ptr",
"typeString": "struct strings.slice memory"
}
],
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"hexValue": "22",
"id": 2529,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "183:3:16",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_6e9f33448a4153023cdaf3eb759f1afdc24aba433a3e18b683f8c04a6eaa69f0",
"typeString": "literal_string \"\"\""
},
"value": "\""
},
"id": 2530,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toSlice",
"nodeType": "MemberAccess",
"referencedDeclaration": 2705,
"src": "183:11:16",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$_t_struct$_slice_$2645_memory_ptr_$bound_to$_t_string_memory_ptr_$",
"typeString": "function (string memory) pure returns (struct strings.slice memory)"
}
},
"id": 2531,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "183:13:16",
"typeDescriptions": {
"typeIdentifier": "t_struct$_slice_$2645_memory_ptr",
"typeString": "struct strings.slice memory"
}
},
"id": 2532,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "concat",
"nodeType": "MemberAccess",
"referencedDeclaration": 4218,
"src": "183:20:16",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_struct$_slice_$2645_memory_ptr_$_t_struct$_slice_$2645_memory_ptr_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_slice_$2645_memory_ptr_$",
"typeString": "function (struct strings.slice memory,struct strings.slice memory) pure returns (string memory)"
}
},
"id": 2536,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "183:39:16",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
},
"id": 2537,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toSlice",
"nodeType": "MemberAccess",
"referencedDeclaration": 2705,
"src": "183:47:16",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$_t_struct$_slice_$2645_memory_ptr_$bound_to$_t_string_memory_ptr_$",
"typeString": "function (string memory) pure returns (struct strings.slice memory)"
}
},
"id": 2538,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "183:49:16",
"typeDescriptions": {
"typeIdentifier": "t_struct$_slice_$2645_memory_ptr",
"typeString": "struct strings.slice memory"
}
},
"id": 2539,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "concat",
"nodeType": "MemberAccess",
"referencedDeclaration": 4218,
"src": "183:56:16",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_struct$_slice_$2645_memory_ptr_$_t_struct$_slice_$2645_memory_ptr_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_slice_$2645_memory_ptr_$",
"typeString": "function (struct strings.slice memory,struct strings.slice memory) pure returns (string memory)"
}
},
"id": 2543,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "183:71:16",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
},
"functionReturnParameters": 2528,
"id": 2544,
"nodeType": "Return",
"src": "176:78:16"
}
]
},
"documentation": null,
"id": 2546,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "quoted",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2525,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2524,
"name": "_string",
"nodeType": "VariableDeclaration",
"scope": 2546,
"src": "119:14:16",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 2523,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "119:6:16",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "118:16:16"
},
"payable": false,
"returnParameters": {
"id": 2528,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2527,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 2546,
"src": "158:6:16",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 2526,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "158:6:16",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "157:8:16"
},
"scope": 2547,
"src": "103:158:16",
"stateMutability": "pure",
"superFunction": null,
"visibility": "internal"
}
],
"scope": 2548,
"src": "51:212:16"
}
],
"src": "0:263:16"
},
"compiler": {
"name": "solc",
"version": "0.4.24+commit.e67f0147.Emscripten.clang"
},
"networks": {},
"schemaVersion": "2.0.1",
"updatedAt": "2018-11-01T09:01:02.394Z"
}