UNPKG

@gooddollar/goodcontracts

Version:
1,371 lines (1,370 loc) 56.7 kB
{ "contractName": "ERC20Detailed", "abi": [ { "inputs": [ { "internalType": "string", "name": "name", "type": "string" }, { "internalType": "string", "name": "symbol", "type": "string" }, { "internalType": "uint8", "name": "decimals", "type": "uint8" } ], "payable": false, "stateMutability": "nonpayable", "type": "constructor" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "spender", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } ], "name": "Approval", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } ], "name": "Transfer", "type": "event" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "address", "name": "spender", "type": "address" } ], "name": "allowance", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "spender", "type": "address" }, { "internalType": "uint256", "name": "value", "type": "uint256" } ], "name": "approve", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "who", "type": "address" } ], "name": "balanceOf", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "totalSupply", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "value", "type": "uint256" } ], "name": "transfer", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "from", "type": "address" }, { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "value", "type": "uint256" } ], "name": "transferFrom", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "name", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "symbol", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "decimals", "outputs": [ { "internalType": "uint8", "name": "", "type": "uint8" } ], "payable": false, "stateMutability": "view", "type": "function" } ], "metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"decimals\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"The decimals are only for visualization purposes. All the operations are done using the smallest and indivisible token unit, just as on Ethereum all the operations are done in wei.\",\"methods\":{\"decimals()\":{\"return\":\"the number of decimals of the token.\"},\"name()\":{\"return\":\"the name of the token.\"},\"symbol()\":{\"return\":\"the symbol of the token.\"}},\"title\":\"ERC20Detailed token\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol\":\"ERC20Detailed\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol\":{\"keccak256\":\"0xe195405e9993d575173cdb5dd408db7459a026b9a98085c1a3b676f020f46584\",\"urls\":[\"bzz-raw://f6beab874b52e710d2c42334e34bb5592146f7dd148d96ff32c0c474412bf2f4\",\"dweb:/ipfs/QmUKmVUX4Fif7dguPgC459cpGegiJd1s24YhgZUrBUkkDN\"]},\"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x079c4e23ee448f529e43bfa3c4e8fb4be52cd0318ee923a276835bedf45b93d8\",\"urls\":[\"bzz-raw://ee762ff5b7746e41d27dcbcea00c7a3034b58adb1b45ddadddb5b721aff450df\",\"dweb:/ipfs/QmdxqtgEFZjHCoiYyz6pUAQ5iBm7As25jcyEbZoTaAgyDa\"]}},\"version\":1}", "bytecode": "0x", "deployedBytecode": "0x", "sourceMap": "", "deployedSourceMap": "", "source": "pragma solidity ^0.5.0;\n\nimport \"./IERC20.sol\";\n\n/**\n * @title ERC20Detailed 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 ERC20Detailed is IERC20 {\n string private _name;\n string private _symbol;\n uint8 private _decimals;\n\n constructor (string memory name, string memory symbol, uint8 decimals) public {\n _name = name;\n _symbol = symbol;\n _decimals = decimals;\n }\n\n /**\n * @return the name of the token.\n */\n function name() public view returns (string memory) {\n return _name;\n }\n\n /**\n * @return the symbol of the token.\n */\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n /**\n * @return the number of decimals of the token.\n */\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n}\n", "sourcePath": "openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol", "ast": { "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol", "exportedSymbols": { "ERC20Detailed": [ 21938 ] }, "id": 21939, "nodeType": "SourceUnit", "nodes": [ { "id": 21882, "literals": [ "solidity", "^", "0.5", ".0" ], "nodeType": "PragmaDirective", "src": "0:23:80" }, { "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", "file": "./IERC20.sol", "id": 21883, "nodeType": "ImportDirective", "scope": 21939, "sourceUnit": 22138, "src": "25:22:80", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 21884, "name": "IERC20", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 22137, "src": "308:6:80", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$22137", "typeString": "contract IERC20" } }, "id": 21885, "nodeType": "InheritanceSpecifier", "src": "308:6:80" } ], "contractDependencies": [ 22137 ], "contractKind": "contract", "documentation": "@title ERC20Detailed 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": 21938, "linearizedBaseContracts": [ 21938, 22137 ], "name": "ERC20Detailed", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 21887, "name": "_name", "nodeType": "VariableDeclaration", "scope": 21938, "src": "321:20:80", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string" }, "typeName": { "id": 21886, "name": "string", "nodeType": "ElementaryTypeName", "src": "321:6:80", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "private" }, { "constant": false, "id": 21889, "name": "_symbol", "nodeType": "VariableDeclaration", "scope": 21938, "src": "347:22:80", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string" }, "typeName": { "id": 21888, "name": "string", "nodeType": "ElementaryTypeName", "src": "347:6:80", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "private" }, { "constant": false, "id": 21891, "name": "_decimals", "nodeType": "VariableDeclaration", "scope": 21938, "src": "375:23:80", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" }, "typeName": { "id": 21890, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "375:5:80", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "value": null, "visibility": "private" }, { "body": { "id": 21912, "nodeType": "Block", "src": "483:85:80", "statements": [ { "expression": { "argumentTypes": null, "id": 21902, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 21900, "name": "_name", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 21887, "src": "493:5:80", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 21901, "name": "name", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 21893, "src": "501:4:80", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, "src": "493:12:80", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" } }, "id": 21903, "nodeType": "ExpressionStatement", "src": "493:12:80" }, { "expression": { "argumentTypes": null, "id": 21906, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 21904, "name": "_symbol", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 21889, "src": "515:7:80", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 21905, "name": "symbol", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 21895, "src": "525:6:80", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, "src": "515:16:80", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" } }, "id": 21907, "nodeType": "ExpressionStatement", "src": "515:16:80" }, { "expression": { "argumentTypes": null, "id": 21910, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 21908, "name": "_decimals", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 21891, "src": "541:9:80", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 21909, "name": "decimals", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 21897, "src": "553:8:80", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "src": "541:20:80", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "id": 21911, "nodeType": "ExpressionStatement", "src": "541:20:80" } ] }, "documentation": null, "id": 21913, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 21898, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 21893, "name": "name", "nodeType": "VariableDeclaration", "scope": 21913, "src": "418:18:80", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 21892, "name": "string", "nodeType": "ElementaryTypeName", "src": "418:6:80", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 21895, "name": "symbol", "nodeType": "VariableDeclaration", "scope": 21913, "src": "438:20:80", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 21894, "name": "string", "nodeType": "ElementaryTypeName", "src": "438:6:80", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 21897, "name": "decimals", "nodeType": "VariableDeclaration", "scope": 21913, "src": "460:14:80", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" }, "typeName": { "id": 21896, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "460:5:80", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "value": null, "visibility": "internal" } ], "src": "417:58:80" }, "returnParameters": { "id": 21899, "nodeType": "ParameterList", "parameters": [], "src": "483:0:80" }, "scope": 21938, "src": "405:163:80", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 21920, "nodeType": "Block", "src": "680:29:80", "statements": [ { "expression": { "argumentTypes": null, "id": 21918, "name": "_name", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 21887, "src": "697:5:80", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" } }, "functionReturnParameters": 21917, "id": 21919, "nodeType": "Return", "src": "690:12:80" } ] }, "documentation": "@return the name of the token.", "id": 21921, "implemented": true, "kind": "function", "modifiers": [], "name": "name", "nodeType": "FunctionDefinition", "parameters": { "id": 21914, "nodeType": "ParameterList", "parameters": [], "src": "641:2:80" }, "returnParameters": { "id": 21917, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 21916, "name": "", "nodeType": "VariableDeclaration", "scope": 21921, "src": "665:13:80", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 21915, "name": "string", "nodeType": "ElementaryTypeName", "src": "665:6:80", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" } ], "src": "664:15:80" }, "scope": 21938, "src": "628:81:80", "stateMutability": "view", "superFunction": null, "visibility": "public" }, { "body": { "id": 21928, "nodeType": "Block", "src": "825:31:80", "statements": [ { "expression": { "argumentTypes": null, "id": 21926, "name": "_symbol", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 21889, "src": "842:7:80", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" } }, "functionReturnParameters": 21925, "id": 21927, "nodeType": "Return", "src": "835:14:80" } ] }, "documentation": "@return the symbol of the token.", "id": 21929, "implemented": true, "kind": "function", "modifiers": [], "name": "symbol", "nodeType": "FunctionDefinition", "parameters": { "id": 21922, "nodeType": "ParameterList", "parameters": [], "src": "786:2:80" }, "returnParameters": { "id": 21925, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 21924, "name": "", "nodeType": "VariableDeclaration", "scope": 21929, "src": "810:13:80", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 21923, "name": "string", "nodeType": "ElementaryTypeName", "src": "810:6:80", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" } ], "src": "809:15:80" }, "scope": 21938, "src": "771:85:80", "stateMutability": "view", "superFunction": null, "visibility": "public" }, { "body": { "id": 21936, "nodeType": "Block", "src": "978:33:80", "statements": [ { "expression": { "argumentTypes": null, "id": 21934, "name": "_decimals", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 21891, "src": "995:9:80", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "functionReturnParameters": 21933, "id": 21935, "nodeType": "Return", "src": "988:16:80" } ] }, "documentation": "@return the number of decimals of the token.", "id": 21937, "implemented": true, "kind": "function", "modifiers": [], "name": "decimals", "nodeType": "FunctionDefinition", "parameters": { "id": 21930, "nodeType": "ParameterList", "parameters": [], "src": "947:2:80" }, "returnParameters": { "id": 21933, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 21932, "name": "", "nodeType": "VariableDeclaration", "scope": 21937, "src": "971:5:80", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" }, "typeName": { "id": 21931, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "971:5:80", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "value": null, "visibility": "internal" } ], "src": "970:7:80" }, "scope": 21938, "src": "930:81:80", "stateMutability": "view", "superFunction": null, "visibility": "public" } ], "scope": 21939, "src": "282:731:80" } ], "src": "0:1014:80" }, "legacyAST": { "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol", "exportedSymbols": { "ERC20Detailed": [ 21938 ] }, "id": 21939, "nodeType": "SourceUnit", "nodes": [ { "id": 21882, "literals": [ "solidity", "^", "0.5", ".0" ], "nodeType": "PragmaDirective", "src": "0:23:80" }, { "absolutePath": "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", "file": "./IERC20.sol", "id": 21883, "nodeType": "ImportDirective", "scope": 21939, "sourceUnit": 22138, "src": "25:22:80", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 21884, "name": "IERC20", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 22137, "src": "308:6:80", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$22137", "typeString": "contract IERC20" } }, "id": 21885, "nodeType": "InheritanceSpecifier", "src": "308:6:80" } ], "contractDependencies": [ 22137 ], "contractKind": "contract", "documentation": "@title ERC20Detailed 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": 21938, "linearizedBaseContracts": [ 21938, 22137 ], "name": "ERC20Detailed", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 21887, "name": "_name", "nodeType": "VariableDeclaration", "scope": 21938, "src": "321:20:80", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string" }, "typeName": { "id": 21886, "name": "string", "nodeType": "ElementaryTypeName", "src": "321:6:80", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "private" }, { "constant": false, "id": 21889, "name": "_symbol", "nodeType": "VariableDeclaration", "scope": 21938, "src": "347:22:80", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string" }, "typeName": { "id": 21888, "name": "string", "nodeType": "ElementaryTypeName", "src": "347:6:80", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "private" }, { "constant": false, "id": 21891, "name": "_decimals", "nodeType": "VariableDeclaration", "scope": 21938, "src": "375:23:80", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" }, "typeName": { "id": 21890, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "375:5:80", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "value": null, "visibility": "private" }, { "body": { "id": 21912, "nodeType": "Block", "src": "483:85:80", "statements": [ { "expression": { "argumentTypes": null, "id": 21902, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 21900, "name": "_name", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 21887, "src": "493:5:80", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 21901, "name": "name", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 21893, "src": "501:4:80", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, "src": "493:12:80", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" } }, "id": 21903, "nodeType": "ExpressionStatement", "src": "493:12:80" }, { "expression": { "argumentTypes": null, "id": 21906, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 21904, "name": "_symbol", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 21889, "src": "515:7:80", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 21905, "name": "symbol", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 21895, "src": "525:6:80", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, "src": "515:16:80", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" } }, "id": 21907, "nodeType": "ExpressionStatement", "src": "515:16:80" }, { "expression": { "argumentTypes": null, "id": 21910, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 21908, "name": "_decimals", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 21891, "src": "541:9:80", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 21909, "name": "decimals", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 21897, "src": "553:8:80", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "src": "541:20:80", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "id": 21911, "nodeType": "ExpressionStatement", "src": "541:20:80" } ] }, "documentation": null, "id": 21913, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 21898, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 21893, "name": "name", "nodeType": "VariableDeclaration", "scope": 21913, "src": "418:18:80", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 21892, "name": "string", "nodeType": "ElementaryTypeName", "src": "418:6:80", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 21895, "name": "symbol", "nodeType": "VariableDeclaration", "scope": 21913, "src": "438:20:80", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 21894, "name": "string", "nodeType": "ElementaryTypeName", "src": "438:6:80", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 21897, "name": "decimals", "nodeType": "VariableDeclaration", "scope": 21913, "src": "460:14:80", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" }, "typeName": { "id": 21896, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "460:5:80", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "value": null, "visibility": "internal" } ], "src": "417:58:80" }, "returnParameters": { "id": 21899, "nodeType": "ParameterList", "parameters": [], "src": "483:0:80" }, "scope": 21938, "src": "405:163:80", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 21920, "nodeType": "Block", "src": "680:29:80", "statements": [ { "expression": { "argumentTypes": null, "id": 21918, "name": "_name", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 21887, "src": "697:5:80", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string storage ref" } }, "functionReturnParameters": 21917, "id": 21919, "nodeType": "Return", "src": "690:12:80" } ] }, "documentation": "@return the name of the token.", "id": 21921, "implemented": true, "kind": "function", "modifiers": [], "name": "name", "nodeType": "FunctionDefinition", "parameters": { "id": 21914, "nodeType": "ParameterList", "parameters": [], "src": "641:2:80" }, "returnParameters": { "id": 21917, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 21916, "name": "", "nodeType": "VariableDeclaration", "scope": 21921, "src": "665:13:80", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string" }, "typeName": { "id": 21915, "name": "string", "nodeType": "ElementaryTypeName", "src": "665:6:80", "typeDescriptions": {