tokenboost-solidity-erc20token
Version:
Solidity contracts for TokenBoost (ERC20Token)
865 lines • 39.1 kB
JSON
{
"contractName": "StringUtils",
"abi": [],
"bytecode": "0x604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a72305820dd7393737ff0ec8238baef035b83a43c75a5fd1164863003a16d19d83b22c55b0029",
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fd00a165627a7a72305820dd7393737ff0ec8238baef035b83a43c75a5fd1164863003a16d19d83b22c55b0029",
"sourceMap": "51:212:13:-;;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:13:-;;;;;;;;",
"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": [
1556
]
},
"id": 1557,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1528,
"literals": [
"solidity",
"^",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:24:13"
},
{
"absolutePath": "tokenboost-solidity/contracts/utils/strings.sol",
"file": "./strings.sol",
"id": 1529,
"nodeType": "ImportDirective",
"scope": 1557,
"sourceUnit": 3343,
"src": "26:23:13",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "library",
"documentation": null,
"fullyImplemented": true,
"id": 1556,
"linearizedBaseContracts": [
1556
],
"name": "StringUtils",
"nodeType": "ContractDefinition",
"nodes": [
{
"id": 1531,
"libraryName": {
"contractScope": null,
"id": 1530,
"name": "strings",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 3342,
"src": "83:7:13",
"typeDescriptions": {
"typeIdentifier": "t_contract$_strings_$3342",
"typeString": "library strings"
}
},
"nodeType": "UsingForDirective",
"src": "77:20:13",
"typeName": null
},
{
"body": {
"id": 1554,
"nodeType": "Block",
"src": "166:95:13",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"hexValue": "22",
"id": 1549,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "240:3:13",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_6e9f33448a4153023cdaf3eb759f1afdc24aba433a3e18b683f8c04a6eaa69f0",
"typeString": "literal_string \"\"\""
},
"value": "\""
},
"id": 1550,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toSlice",
"nodeType": "MemberAccess",
"referencedDeclaration": 1714,
"src": "240:11:13",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$_t_struct$_slice_$1654_memory_ptr_$bound_to$_t_string_memory_ptr_$",
"typeString": "function (string memory) pure returns (struct strings.slice memory)"
}
},
"id": 1551,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "240:13:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_slice_$1654_memory_ptr",
"typeString": "struct strings.slice memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_slice_$1654_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": 1542,
"name": "_string",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1533,
"src": "204:7:13",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
},
"id": 1543,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toSlice",
"nodeType": "MemberAccess",
"referencedDeclaration": 1714,
"src": "204:15:13",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$_t_struct$_slice_$1654_memory_ptr_$bound_to$_t_string_memory_ptr_$",
"typeString": "function (string memory) pure returns (struct strings.slice memory)"
}
},
"id": 1544,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "204:17:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_slice_$1654_memory_ptr",
"typeString": "struct strings.slice memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_slice_$1654_memory_ptr",
"typeString": "struct strings.slice memory"
}
],
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"hexValue": "22",
"id": 1538,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "183:3:13",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_6e9f33448a4153023cdaf3eb759f1afdc24aba433a3e18b683f8c04a6eaa69f0",
"typeString": "literal_string \"\"\""
},
"value": "\""
},
"id": 1539,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toSlice",
"nodeType": "MemberAccess",
"referencedDeclaration": 1714,
"src": "183:11:13",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$_t_struct$_slice_$1654_memory_ptr_$bound_to$_t_string_memory_ptr_$",
"typeString": "function (string memory) pure returns (struct strings.slice memory)"
}
},
"id": 1540,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "183:13:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_slice_$1654_memory_ptr",
"typeString": "struct strings.slice memory"
}
},
"id": 1541,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "concat",
"nodeType": "MemberAccess",
"referencedDeclaration": 3227,
"src": "183:20:13",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_struct$_slice_$1654_memory_ptr_$_t_struct$_slice_$1654_memory_ptr_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_slice_$1654_memory_ptr_$",
"typeString": "function (struct strings.slice memory,struct strings.slice memory) pure returns (string memory)"
}
},
"id": 1545,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "183:39:13",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
},
"id": 1546,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toSlice",
"nodeType": "MemberAccess",
"referencedDeclaration": 1714,
"src": "183:47:13",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$_t_struct$_slice_$1654_memory_ptr_$bound_to$_t_string_memory_ptr_$",
"typeString": "function (string memory) pure returns (struct strings.slice memory)"
}
},
"id": 1547,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "183:49:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_slice_$1654_memory_ptr",
"typeString": "struct strings.slice memory"
}
},
"id": 1548,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "concat",
"nodeType": "MemberAccess",
"referencedDeclaration": 3227,
"src": "183:56:13",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_struct$_slice_$1654_memory_ptr_$_t_struct$_slice_$1654_memory_ptr_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_slice_$1654_memory_ptr_$",
"typeString": "function (struct strings.slice memory,struct strings.slice memory) pure returns (string memory)"
}
},
"id": 1552,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "183:71:13",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
},
"functionReturnParameters": 1537,
"id": 1553,
"nodeType": "Return",
"src": "176:78:13"
}
]
},
"documentation": null,
"id": 1555,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "quoted",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1534,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1533,
"name": "_string",
"nodeType": "VariableDeclaration",
"scope": 1555,
"src": "119:14:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 1532,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "119:6:13",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "118:16:13"
},
"payable": false,
"returnParameters": {
"id": 1537,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1536,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1555,
"src": "158:6:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 1535,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "158:6:13",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "157:8:13"
},
"scope": 1556,
"src": "103:158:13",
"stateMutability": "pure",
"superFunction": null,
"visibility": "internal"
}
],
"scope": 1557,
"src": "51:212:13"
}
],
"src": "0:263:13"
},
"legacyAST": {
"absolutePath": "tokenboost-solidity/contracts/utils/StringUtils.sol",
"exportedSymbols": {
"StringUtils": [
1556
]
},
"id": 1557,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1528,
"literals": [
"solidity",
"^",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:24:13"
},
{
"absolutePath": "tokenboost-solidity/contracts/utils/strings.sol",
"file": "./strings.sol",
"id": 1529,
"nodeType": "ImportDirective",
"scope": 1557,
"sourceUnit": 3343,
"src": "26:23:13",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "library",
"documentation": null,
"fullyImplemented": true,
"id": 1556,
"linearizedBaseContracts": [
1556
],
"name": "StringUtils",
"nodeType": "ContractDefinition",
"nodes": [
{
"id": 1531,
"libraryName": {
"contractScope": null,
"id": 1530,
"name": "strings",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 3342,
"src": "83:7:13",
"typeDescriptions": {
"typeIdentifier": "t_contract$_strings_$3342",
"typeString": "library strings"
}
},
"nodeType": "UsingForDirective",
"src": "77:20:13",
"typeName": null
},
{
"body": {
"id": 1554,
"nodeType": "Block",
"src": "166:95:13",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"hexValue": "22",
"id": 1549,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "240:3:13",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_6e9f33448a4153023cdaf3eb759f1afdc24aba433a3e18b683f8c04a6eaa69f0",
"typeString": "literal_string \"\"\""
},
"value": "\""
},
"id": 1550,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toSlice",
"nodeType": "MemberAccess",
"referencedDeclaration": 1714,
"src": "240:11:13",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$_t_struct$_slice_$1654_memory_ptr_$bound_to$_t_string_memory_ptr_$",
"typeString": "function (string memory) pure returns (struct strings.slice memory)"
}
},
"id": 1551,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "240:13:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_slice_$1654_memory_ptr",
"typeString": "struct strings.slice memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_slice_$1654_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": 1542,
"name": "_string",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1533,
"src": "204:7:13",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
},
"id": 1543,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toSlice",
"nodeType": "MemberAccess",
"referencedDeclaration": 1714,
"src": "204:15:13",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$_t_struct$_slice_$1654_memory_ptr_$bound_to$_t_string_memory_ptr_$",
"typeString": "function (string memory) pure returns (struct strings.slice memory)"
}
},
"id": 1544,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "204:17:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_slice_$1654_memory_ptr",
"typeString": "struct strings.slice memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_struct$_slice_$1654_memory_ptr",
"typeString": "struct strings.slice memory"
}
],
"expression": {
"argumentTypes": null,
"arguments": [],
"expression": {
"argumentTypes": [],
"expression": {
"argumentTypes": null,
"hexValue": "22",
"id": 1538,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "183:3:13",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_6e9f33448a4153023cdaf3eb759f1afdc24aba433a3e18b683f8c04a6eaa69f0",
"typeString": "literal_string \"\"\""
},
"value": "\""
},
"id": 1539,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toSlice",
"nodeType": "MemberAccess",
"referencedDeclaration": 1714,
"src": "183:11:13",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$_t_struct$_slice_$1654_memory_ptr_$bound_to$_t_string_memory_ptr_$",
"typeString": "function (string memory) pure returns (struct strings.slice memory)"
}
},
"id": 1540,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "183:13:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_slice_$1654_memory_ptr",
"typeString": "struct strings.slice memory"
}
},
"id": 1541,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "concat",
"nodeType": "MemberAccess",
"referencedDeclaration": 3227,
"src": "183:20:13",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_struct$_slice_$1654_memory_ptr_$_t_struct$_slice_$1654_memory_ptr_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_slice_$1654_memory_ptr_$",
"typeString": "function (struct strings.slice memory,struct strings.slice memory) pure returns (string memory)"
}
},
"id": 1545,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "183:39:13",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
},
"id": 1546,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "toSlice",
"nodeType": "MemberAccess",
"referencedDeclaration": 1714,
"src": "183:47:13",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_string_memory_ptr_$returns$_t_struct$_slice_$1654_memory_ptr_$bound_to$_t_string_memory_ptr_$",
"typeString": "function (string memory) pure returns (struct strings.slice memory)"
}
},
"id": 1547,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "183:49:13",
"typeDescriptions": {
"typeIdentifier": "t_struct$_slice_$1654_memory_ptr",
"typeString": "struct strings.slice memory"
}
},
"id": 1548,
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"memberName": "concat",
"nodeType": "MemberAccess",
"referencedDeclaration": 3227,
"src": "183:56:13",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_pure$_t_struct$_slice_$1654_memory_ptr_$_t_struct$_slice_$1654_memory_ptr_$returns$_t_string_memory_ptr_$bound_to$_t_struct$_slice_$1654_memory_ptr_$",
"typeString": "function (struct strings.slice memory,struct strings.slice memory) pure returns (string memory)"
}
},
"id": 1552,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "183:71:13",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
},
"functionReturnParameters": 1537,
"id": 1553,
"nodeType": "Return",
"src": "176:78:13"
}
]
},
"documentation": null,
"id": 1555,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "quoted",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1534,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1533,
"name": "_string",
"nodeType": "VariableDeclaration",
"scope": 1555,
"src": "119:14:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 1532,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "119:6:13",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "118:16:13"
},
"payable": false,
"returnParameters": {
"id": 1537,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1536,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1555,
"src": "158:6:13",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 1535,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "158:6:13",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "157:8:13"
},
"scope": 1556,
"src": "103:158:13",
"stateMutability": "pure",
"superFunction": null,
"visibility": "internal"
}
],
"scope": 1557,
"src": "51:212:13"
}
],
"src": "0:263:13"
},
"compiler": {
"name": "solc",
"version": "0.4.24+commit.e67f0147.Emscripten.clang"
},
"networks": {},
"schemaVersion": "2.0.1",
"updatedAt": "2018-10-07T15:52:36.190Z"
}