UNPKG

truffle-analyze

Version:

Add vulnerability and weakness analysis via the MythX

1,270 lines 59 kB
{ "contractName": "Over", "abi": [ { "constant": true, "inputs": [], "name": "totalSupply", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "inputs": [ { "name": "_initialSupply", "type": "uint256" } ], "payable": false, "stateMutability": "nonpayable", "type": "constructor" }, { "constant": false, "inputs": [ { "name": "_to", "type": "address" }, { "name": "_value", "type": "uint256" } ], "name": "sendeth", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [ { "name": "_owner", "type": "address" } ], "name": "balanceOf", "outputs": [ { "name": "balance", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" } ], "bytecode": "0x608060405234801561001057600080fd5b506040516020806103168339810180604052602081101561003057600080fd5b81019080805190602001909291905050508060018190556000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505061027d806100996000396000f3fe608060405260043610610057576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806318160ddd1461005c57806370a0823114610087578063a3210e87146100ec575b600080fd5b34801561006857600080fd5b5061007161015f565b6040518082815260200191505060405180910390f35b34801561009357600080fd5b506100d6600480360360208110156100aa57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610165565b6040518082815260200191505060405180910390f35b3480156100f857600080fd5b506101456004803603604081101561010f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506101ad565b604051808215151515815260200191505060405180910390f35b60015481565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550600190509291505056fea165627a7a723058202280a17978014625d86c3822bb532a93e163ed2d2ce0d7dba453fb83f56dd51a0029", "deployedBytecode": "0x608060405260043610610057576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806318160ddd1461005c57806370a0823114610087578063a3210e87146100ec575b600080fd5b34801561006857600080fd5b5061007161015f565b6040518082815260200191505060405180910390f35b34801561009357600080fd5b506100d6600480360360208110156100aa57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610165565b6040518082815260200191505060405180910390f35b3480156100f857600080fd5b506101456004803603604081101561010f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506101ad565b604051808215151515815260200191505060405180910390f35b60015481565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550600190509291505056fea165627a7a723058202280a17978014625d86c3822bb532a93e163ed2d2ce0d7dba453fb83f56dd51a0029", "sourceMap": "25:504:1:-;;;109:102;8:9:-1;5:2;;;30:1;27;20:12;5:2;109:102:1;;;;;;;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;109:102:1;;;;;;;;;;;;;;;;192:14;178:11;:28;;;155:8;:20;164:10;155:20;;;;;;;;;;;;;;;:51;;;;109:102;25:504;;;;;;", "deployedSourceMap": "25:504:1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;81:23;;8:9:-1;5:2;;;30:1;27;20:12;5:2;81:23:1;;;;;;;;;;;;;;;;;;;;;;;423:104;;8:9:-1;5:2;;;30:1;27;20:12;5:2;423:104:1;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;423:104:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;215:204;;8:9:-1;5:2;;;30:1;27;20:12;5:2;215:204:1;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;215:204:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;81:23;;;;:::o;423:104::-;479:12;506:8;:16;515:6;506:16;;;;;;;;;;;;;;;;499:23;;423:104;;;:::o;215:204::-;274:4;362:6;338:8;:20;347:10;338:20;;;;;;;;;;;;;;;;:30;;;;;;;;;;;391:6;374:8;:13;383:3;374:13;;;;;;;;;;;;;;;;:23;;;;;;;;;;;410:4;403:11;;215:204;;;;:::o", "source": "pragma solidity 0.5.0;\n\n\ncontract Over {\n\n mapping(address => uint) balances;\n uint public totalSupply;\n\n constructor(uint _initialSupply) public {\n balances[msg.sender] = totalSupply = _initialSupply;\n }\n\n function sendeth(address _to, uint _value) public returns (bool) {\n // require(balances[msg.sender] - _value >= 0);\n balances[msg.sender] -= _value;\n balances[_to] += _value;\n return true;\n }\n\n function balanceOf(address _owner) public view returns (uint balance) {\n return balances[_owner];\n }\n}\n", "sourcePath": "/home/rocky/truffle/mythjs-should-detect/overflow/contracts/Over.sol", "ast": { "absolutePath": "/home/rocky/truffle/mythjs-should-detect/overflow/contracts/Over.sol", "exportedSymbols": { "Over": [ 117 ] }, "id": 118, "nodeType": "SourceUnit", "nodes": [ { "id": 58, "literals": [ "solidity", "0.5", ".0" ], "nodeType": "PragmaDirective", "src": "0:22:1" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 117, "linearizedBaseContracts": [ 117 ], "name": "Over", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 62, "name": "balances", "nodeType": "VariableDeclaration", "scope": 117, "src": "44:33:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "typeName": { "id": 61, "keyType": { "id": 59, "name": "address", "nodeType": "ElementaryTypeName", "src": "52:7:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", "src": "44:24:1", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "valueType": { "id": 60, "name": "uint", "nodeType": "ElementaryTypeName", "src": "63:4:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 64, "name": "totalSupply", "nodeType": "VariableDeclaration", "scope": 117, "src": "81:23:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 63, "name": "uint", "nodeType": "ElementaryTypeName", "src": "81:4:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "public" }, { "body": { "id": 78, "nodeType": "Block", "src": "149:62:1", "statements": [ { "expression": { "argumentTypes": null, "id": 76, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 69, "name": "balances", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 62, "src": "155:8:1", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 72, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 70, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 132, "src": "164:3:1", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 71, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "164:10:1", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "155:20:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 75, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 73, "name": "totalSupply", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 64, "src": "178:11:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 74, "name": "_initialSupply", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 66, "src": "192:14:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "178:28:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "155:51:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 77, "nodeType": "ExpressionStatement", "src": "155:51:1" } ] }, "documentation": null, "id": 79, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 67, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 66, "name": "_initialSupply", "nodeType": "VariableDeclaration", "scope": 79, "src": "121:19:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 65, "name": "uint", "nodeType": "ElementaryTypeName", "src": "121:4:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "120:21:1" }, "returnParameters": { "id": 68, "nodeType": "ParameterList", "parameters": [], "src": "149:0:1" }, "scope": 117, "src": "109:102:1", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 103, "nodeType": "Block", "src": "280:139:1", "statements": [ { "expression": { "argumentTypes": null, "id": 93, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 88, "name": "balances", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 62, "src": "338:8:1", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 91, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 89, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 132, "src": "347:3:1", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 90, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "347:10:1", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "338:20:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "-=", "rightHandSide": { "argumentTypes": null, "id": 92, "name": "_value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 83, "src": "362:6:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "338:30:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 94, "nodeType": "ExpressionStatement", "src": "338:30:1" }, { "expression": { "argumentTypes": null, "id": 99, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 95, "name": "balances", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 62, "src": "374:8:1", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 97, "indexExpression": { "argumentTypes": null, "id": 96, "name": "_to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 81, "src": "383:3:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "374:13:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "+=", "rightHandSide": { "argumentTypes": null, "id": 98, "name": "_value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 83, "src": "391:6:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "374:23:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 100, "nodeType": "ExpressionStatement", "src": "374:23:1" }, { "expression": { "argumentTypes": null, "hexValue": "74727565", "id": 101, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "410:4:1", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, "functionReturnParameters": 87, "id": 102, "nodeType": "Return", "src": "403:11:1" } ] }, "documentation": null, "id": 104, "implemented": true, "kind": "function", "modifiers": [], "name": "sendeth", "nodeType": "FunctionDefinition", "parameters": { "id": 84, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 81, "name": "_to", "nodeType": "VariableDeclaration", "scope": 104, "src": "232:11:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 80, "name": "address", "nodeType": "ElementaryTypeName", "src": "232:7:1", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 83, "name": "_value", "nodeType": "VariableDeclaration", "scope": 104, "src": "245:11:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 82, "name": "uint", "nodeType": "ElementaryTypeName", "src": "245:4:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "231:26:1" }, "returnParameters": { "id": 87, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 86, "name": "", "nodeType": "VariableDeclaration", "scope": 104, "src": "274:4:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 85, "name": "bool", "nodeType": "ElementaryTypeName", "src": "274:4:1", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "273:6:1" }, "scope": 117, "src": "215:204:1", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 115, "nodeType": "Block", "src": "493:34:1", "statements": [ { "expression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 111, "name": "balances", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 62, "src": "506:8:1", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 113, "indexExpression": { "argumentTypes": null, "id": 112, "name": "_owner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 106, "src": "515:6:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "506:16:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 110, "id": 114, "nodeType": "Return", "src": "499:23:1" } ] }, "documentation": null, "id": 116, "implemented": true, "kind": "function", "modifiers": [], "name": "balanceOf", "nodeType": "FunctionDefinition", "parameters": { "id": 107, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 106, "name": "_owner", "nodeType": "VariableDeclaration", "scope": 116, "src": "442:14:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 105, "name": "address", "nodeType": "ElementaryTypeName", "src": "442:7:1", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "441:16:1" }, "returnParameters": { "id": 110, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 109, "name": "balance", "nodeType": "VariableDeclaration", "scope": 116, "src": "479:12:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 108, "name": "uint", "nodeType": "ElementaryTypeName", "src": "479:4:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "478:14:1" }, "scope": 117, "src": "423:104:1", "stateMutability": "view", "superFunction": null, "visibility": "public" } ], "scope": 118, "src": "25:504:1" } ], "src": "0:530:1" }, "legacyAST": { "absolutePath": "/home/rocky/truffle/mythjs-should-detect/overflow/contracts/Over.sol", "exportedSymbols": { "Over": [ 117 ] }, "id": 118, "nodeType": "SourceUnit", "nodes": [ { "id": 58, "literals": [ "solidity", "0.5", ".0" ], "nodeType": "PragmaDirective", "src": "0:22:1" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 117, "linearizedBaseContracts": [ 117 ], "name": "Over", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 62, "name": "balances", "nodeType": "VariableDeclaration", "scope": 117, "src": "44:33:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "typeName": { "id": 61, "keyType": { "id": 59, "name": "address", "nodeType": "ElementaryTypeName", "src": "52:7:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", "src": "44:24:1", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "valueType": { "id": 60, "name": "uint", "nodeType": "ElementaryTypeName", "src": "63:4:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 64, "name": "totalSupply", "nodeType": "VariableDeclaration", "scope": 117, "src": "81:23:1", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 63, "name": "uint", "nodeType": "ElementaryTypeName", "src": "81:4:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "public" }, { "body": { "id": 78, "nodeType": "Block", "src": "149:62:1", "statements": [ { "expression": { "argumentTypes": null, "id": 76, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 69, "name": "balances", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 62, "src": "155:8:1", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 72, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 70, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 132, "src": "164:3:1", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 71, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "164:10:1", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "155:20:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 75, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 73, "name": "totalSupply", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 64, "src": "178:11:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 74, "name": "_initialSupply", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 66, "src": "192:14:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "178:28:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "155:51:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 77, "nodeType": "ExpressionStatement", "src": "155:51:1" } ] }, "documentation": null, "id": 79, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 67, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 66, "name": "_initialSupply", "nodeType": "VariableDeclaration", "scope": 79, "src": "121:19:1", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 65, "name": "uint", "nodeType": "ElementaryTypeName", "src": "121:4:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "120:21:1" }, "returnParameters": { "id": 68, "nodeType": "ParameterList", "parameters": [], "src": "149:0:1" }, "scope": 117, "src": "109:102:1", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 103, "nodeType": "Block", "src": "280:139:1", "statements": [ { "expression": { "argumentTypes": null, "id": 93, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 88, "name": "balances", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 62, "src": "338:8:1", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 91, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 89, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 132, "src": "347:3:1", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 90, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "347:10:1", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "338:20:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "-=", "rightHandSide": { "argumentTypes": null, "id": 92, "name": "_value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 83, "src": "362:6:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "338:30:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 94, "nodeType": "ExpressionStatement", "src": "338:30:1" }, { "expression": { "argumentTypes": null, "id": 99, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 95, "name": "balances", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 62, "src": "374:8:1", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 97, "indexExpression": { "argumentTypes": null, "id": 96, "name": "_to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 81, "src": "383:3:1", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "374:13:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "+=", "rightHandSide": { "argumentTypes": null, "id": 98, "name": "_value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 83, "src": "391:6:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "374:23:1", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 100, "nodeType": "ExpressionStatement", "src": "374:23:1" }, { "expression": { "argumentTypes": null, "hexValue": "74727565", "id": 101, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "410:4:1", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, "functionReturnParameters": 87, "id": 102, "