tokenboost-solidity-erc20token
Version:
Solidity contracts for TokenBoost (ERC20Token)
1,064 lines • 33.5 kB
JSON
{
"contractName": "DetailedERC20",
"abi": [
{
"constant": true,
"inputs": [],
"name": "name",
"outputs": [
{
"name": "",
"type": "string"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_spender",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "approve",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_from",
"type": "address"
},
{
"name": "_to",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "decimals",
"outputs": [
{
"name": "",
"type": "uint8"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_who",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "symbol",
"outputs": [
{
"name": "",
"type": "string"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_to",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_owner",
"type": "address"
},
{
"name": "_spender",
"type": "address"
}
],
"name": "allowance",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"name": "_name",
"type": "string"
},
{
"name": "_symbol",
"type": "string"
},
{
"name": "_decimals",
"type": "uint8"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "owner",
"type": "address"
},
{
"indexed": true,
"name": "spender",
"type": "address"
},
{
"indexed": false,
"name": "value",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "from",
"type": "address"
},
{
"indexed": true,
"name": "to",
"type": "address"
},
{
"indexed": false,
"name": "value",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
}
],
"bytecode": "0x",
"deployedBytecode": "0x",
"sourceMap": "",
"deployedSourceMap": "",
"source": "pragma solidity ^0.4.24;\n\nimport \"./ERC20.sol\";\n\n\n/**\n * @title DetailedERC20 token\n * @dev The decimals are only for visualization purposes.\n * All the operations are done using the smallest and indivisible token unit,\n * just as on Ethereum all the operations are done in wei.\n */\ncontract DetailedERC20 is ERC20 {\n string public name;\n string public symbol;\n uint8 public decimals;\n\n constructor(string _name, string _symbol, uint8 _decimals) public {\n name = _name;\n symbol = _symbol;\n decimals = _decimals;\n }\n}\n",
"sourcePath": "zeppelin-solidity/contracts/token/ERC20/DetailedERC20.sol",
"ast": {
"absolutePath": "zeppelin-solidity/contracts/token/ERC20/DetailedERC20.sol",
"exportedSymbols": {
"DetailedERC20": [
4323
]
},
"id": 4324,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 4291,
"literals": [
"solidity",
"^",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:24:24"
},
{
"absolutePath": "zeppelin-solidity/contracts/token/ERC20/ERC20.sol",
"file": "./ERC20.sol",
"id": 4292,
"nodeType": "ImportDirective",
"scope": 4324,
"sourceUnit": 4367,
"src": "26:21:24",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 4293,
"name": "ERC20",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 4366,
"src": "309:5:24",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20_$4366",
"typeString": "contract ERC20"
}
},
"id": 4294,
"nodeType": "InheritanceSpecifier",
"src": "309:5:24"
}
],
"contractDependencies": [
4366,
4398
],
"contractKind": "contract",
"documentation": "@title DetailedERC20 token\n@dev The decimals are only for visualization purposes.\nAll the operations are done using the smallest and indivisible token unit,\njust as on Ethereum all the operations are done in wei.",
"fullyImplemented": false,
"id": 4323,
"linearizedBaseContracts": [
4323,
4366,
4398
],
"name": "DetailedERC20",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 4296,
"name": "name",
"nodeType": "VariableDeclaration",
"scope": 4323,
"src": "319:18:24",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string"
},
"typeName": {
"id": 4295,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "319:6:24",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 4298,
"name": "symbol",
"nodeType": "VariableDeclaration",
"scope": 4323,
"src": "341:20:24",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string"
},
"typeName": {
"id": 4297,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "341:6:24",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 4300,
"name": "decimals",
"nodeType": "VariableDeclaration",
"scope": 4323,
"src": "365:21:24",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 4299,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "365:5:24",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "public"
},
{
"body": {
"id": 4321,
"nodeType": "Block",
"src": "457:71:24",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 4311,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 4309,
"name": "name",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4296,
"src": "463:4:24",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string storage ref"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 4310,
"name": "_name",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4302,
"src": "470:5:24",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
},
"src": "463:12:24",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string storage ref"
}
},
"id": 4312,
"nodeType": "ExpressionStatement",
"src": "463:12:24"
},
{
"expression": {
"argumentTypes": null,
"id": 4315,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 4313,
"name": "symbol",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4298,
"src": "481:6:24",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string storage ref"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 4314,
"name": "_symbol",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4304,
"src": "490:7:24",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
},
"src": "481:16:24",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string storage ref"
}
},
"id": 4316,
"nodeType": "ExpressionStatement",
"src": "481:16:24"
},
{
"expression": {
"argumentTypes": null,
"id": 4319,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 4317,
"name": "decimals",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4300,
"src": "503:8:24",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 4318,
"name": "_decimals",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4306,
"src": "514:9:24",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"src": "503:20:24",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"id": 4320,
"nodeType": "ExpressionStatement",
"src": "503:20:24"
}
]
},
"documentation": null,
"id": 4322,
"implemented": true,
"isConstructor": true,
"isDeclaredConst": false,
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 4307,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4302,
"name": "_name",
"nodeType": "VariableDeclaration",
"scope": 4322,
"src": "403:12:24",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 4301,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "403:6:24",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 4304,
"name": "_symbol",
"nodeType": "VariableDeclaration",
"scope": 4322,
"src": "417:14:24",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 4303,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "417:6:24",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 4306,
"name": "_decimals",
"nodeType": "VariableDeclaration",
"scope": 4322,
"src": "433:15:24",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 4305,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "433:5:24",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "402:47:24"
},
"payable": false,
"returnParameters": {
"id": 4308,
"nodeType": "ParameterList",
"parameters": [],
"src": "457:0:24"
},
"scope": 4323,
"src": "391:137:24",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
}
],
"scope": 4324,
"src": "283:247:24"
}
],
"src": "0:531:24"
},
"legacyAST": {
"absolutePath": "zeppelin-solidity/contracts/token/ERC20/DetailedERC20.sol",
"exportedSymbols": {
"DetailedERC20": [
4323
]
},
"id": 4324,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 4291,
"literals": [
"solidity",
"^",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:24:24"
},
{
"absolutePath": "zeppelin-solidity/contracts/token/ERC20/ERC20.sol",
"file": "./ERC20.sol",
"id": 4292,
"nodeType": "ImportDirective",
"scope": 4324,
"sourceUnit": 4367,
"src": "26:21:24",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 4293,
"name": "ERC20",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 4366,
"src": "309:5:24",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20_$4366",
"typeString": "contract ERC20"
}
},
"id": 4294,
"nodeType": "InheritanceSpecifier",
"src": "309:5:24"
}
],
"contractDependencies": [
4366,
4398
],
"contractKind": "contract",
"documentation": "@title DetailedERC20 token\n@dev The decimals are only for visualization purposes.\nAll the operations are done using the smallest and indivisible token unit,\njust as on Ethereum all the operations are done in wei.",
"fullyImplemented": false,
"id": 4323,
"linearizedBaseContracts": [
4323,
4366,
4398
],
"name": "DetailedERC20",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 4296,
"name": "name",
"nodeType": "VariableDeclaration",
"scope": 4323,
"src": "319:18:24",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string"
},
"typeName": {
"id": 4295,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "319:6:24",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 4298,
"name": "symbol",
"nodeType": "VariableDeclaration",
"scope": 4323,
"src": "341:20:24",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string"
},
"typeName": {
"id": 4297,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "341:6:24",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 4300,
"name": "decimals",
"nodeType": "VariableDeclaration",
"scope": 4323,
"src": "365:21:24",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 4299,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "365:5:24",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "public"
},
{
"body": {
"id": 4321,
"nodeType": "Block",
"src": "457:71:24",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 4311,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 4309,
"name": "name",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4296,
"src": "463:4:24",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string storage ref"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 4310,
"name": "_name",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4302,
"src": "470:5:24",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
},
"src": "463:12:24",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string storage ref"
}
},
"id": 4312,
"nodeType": "ExpressionStatement",
"src": "463:12:24"
},
{
"expression": {
"argumentTypes": null,
"id": 4315,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 4313,
"name": "symbol",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4298,
"src": "481:6:24",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string storage ref"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 4314,
"name": "_symbol",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4304,
"src": "490:7:24",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string memory"
}
},
"src": "481:16:24",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string storage ref"
}
},
"id": 4316,
"nodeType": "ExpressionStatement",
"src": "481:16:24"
},
{
"expression": {
"argumentTypes": null,
"id": 4319,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 4317,
"name": "decimals",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4300,
"src": "503:8:24",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 4318,
"name": "_decimals",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4306,
"src": "514:9:24",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"src": "503:20:24",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"id": 4320,
"nodeType": "ExpressionStatement",
"src": "503:20:24"
}
]
},
"documentation": null,
"id": 4322,
"implemented": true,
"isConstructor": true,
"isDeclaredConst": false,
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 4307,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4302,
"name": "_name",
"nodeType": "VariableDeclaration",
"scope": 4322,
"src": "403:12:24",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 4301,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "403:6:24",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 4304,
"name": "_symbol",
"nodeType": "VariableDeclaration",
"scope": 4322,
"src": "417:14:24",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_memory_ptr",
"typeString": "string"
},
"typeName": {
"id": 4303,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "417:6:24",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 4306,
"name": "_decimals",
"nodeType": "VariableDeclaration",
"scope": 4322,
"src": "433:15:24",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 4305,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "433:5:24",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "402:47:24"
},
"payable": false,
"returnParameters": {
"id": 4308,
"nodeType": "ParameterList",
"parameters": [],
"src": "457:0:24"
},
"scope": 4323,
"src": "391:137:24",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
}
],
"scope": 4324,
"src": "283:247:24"
}
],
"src": "0:531:24"
},
"compiler": {
"name": "solc",
"version": "0.4.24+commit.e67f0147.Emscripten.clang"
},
"networks": {},
"schemaVersion": "2.0.1",
"updatedAt": "2018-10-16T05:56:33.185Z"
}