UNPKG

@netvote/elections-solidity

Version:
1,045 lines (1,044 loc) 159 kB
{ "contractName": "StandardToken", "abi": [ { "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": false, "inputs": [ { "name": "_spender", "type": "address" }, { "name": "_subtractedValue", "type": "uint256" } ], "name": "decreaseApproval", "outputs": [ { "name": "success", "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" }, { "constant": false, "inputs": [ { "name": "_to", "type": "address" }, { "name": "_value", "type": "uint256" } ], "name": "transfer", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "_spender", "type": "address" }, { "name": "_addedValue", "type": "uint256" } ], "name": "increaseApproval", "outputs": [ { "name": "success", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [ { "name": "_owner", "type": "address" }, { "name": "_spender", "type": "address" } ], "name": "allowance", "outputs": [ { "name": "remaining", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "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": "0x6060604052341561000f57600080fd5b6106698061001e6000396000f30060606040526004361061008d5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663095ea7b3811461009257806318160ddd146100c857806323b872dd146100ed578063661884631461011557806370a0823114610137578063a9059cbb14610156578063d73dd62314610178578063dd62ed3e1461019a575b600080fd5b341561009d57600080fd5b6100b4600160a060020a03600435166024356101bf565b604051901515815260200160405180910390f35b34156100d357600080fd5b6100db61022b565b60405190815260200160405180910390f35b34156100f857600080fd5b6100b4600160a060020a0360043581169060243516604435610231565b341561012057600080fd5b6100b4600160a060020a036004351660243561035b565b341561014257600080fd5b6100db600160a060020a0360043516610455565b341561016157600080fd5b6100b4600160a060020a0360043516602435610470565b341561018357600080fd5b6100b4600160a060020a0360043516602435610546565b34156101a557600080fd5b6100db600160a060020a03600435811690602435166105ea565b600160a060020a03338116600081815260026020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60005481565b600080600160a060020a038416151561024957600080fd5b50600160a060020a0380851660008181526002602090815260408083203390951683529381528382205492825260019052919091205461028f908463ffffffff61061516565b600160a060020a0380871660009081526001602052604080822093909355908616815220546102c4908463ffffffff61062716565b600160a060020a0385166000908152600160205260409020556102ed818463ffffffff61061516565b600160a060020a03808716600081815260026020908152604080832033861684529091529081902093909355908616917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9086905190815260200160405180910390a3506001949350505050565b600160a060020a033381166000908152600260209081526040808320938616835292905290812054808311156103b857600160a060020a0333811660009081526002602090815260408083209388168352929052908120556103ef565b6103c8818463ffffffff61061516565b600160a060020a033381166000908152600260209081526040808320938916835292905220555b600160a060020a0333811660008181526002602090815260408083209489168084529490915290819020547f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925915190815260200160405180910390a35060019392505050565b600160a060020a031660009081526001602052604090205490565b6000600160a060020a038316151561048757600080fd5b600160a060020a0333166000908152600160205260409020546104b0908363ffffffff61061516565b600160a060020a0333811660009081526001602052604080822093909355908516815220546104e5908363ffffffff61062716565b600160a060020a0380851660008181526001602052604090819020939093559133909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a350600192915050565b600160a060020a03338116600090815260026020908152604080832093861683529290529081205461057e908363ffffffff61062716565b600160a060020a0333811660008181526002602090815260408083209489168084529490915290819020849055919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591905190815260200160405180910390a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b60008282111561062157fe5b50900390565b60008282018381101561063657fe5b93925050505600a165627a7a72305820cf4f1c3380b05f9c6790be146f1df0f17045ce3a110bc8645dd90c1025a3aff90029", "deployedBytecode": "0x60606040526004361061008d5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663095ea7b3811461009257806318160ddd146100c857806323b872dd146100ed578063661884631461011557806370a0823114610137578063a9059cbb14610156578063d73dd62314610178578063dd62ed3e1461019a575b600080fd5b341561009d57600080fd5b6100b4600160a060020a03600435166024356101bf565b604051901515815260200160405180910390f35b34156100d357600080fd5b6100db61022b565b60405190815260200160405180910390f35b34156100f857600080fd5b6100b4600160a060020a0360043581169060243516604435610231565b341561012057600080fd5b6100b4600160a060020a036004351660243561035b565b341561014257600080fd5b6100db600160a060020a0360043516610455565b341561016157600080fd5b6100b4600160a060020a0360043516602435610470565b341561018357600080fd5b6100b4600160a060020a0360043516602435610546565b34156101a557600080fd5b6100db600160a060020a03600435811690602435166105ea565b600160a060020a03338116600081815260026020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60005481565b600080600160a060020a038416151561024957600080fd5b50600160a060020a0380851660008181526002602090815260408083203390951683529381528382205492825260019052919091205461028f908463ffffffff61061516565b600160a060020a0380871660009081526001602052604080822093909355908616815220546102c4908463ffffffff61062716565b600160a060020a0385166000908152600160205260409020556102ed818463ffffffff61061516565b600160a060020a03808716600081815260026020908152604080832033861684529091529081902093909355908616917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9086905190815260200160405180910390a3506001949350505050565b600160a060020a033381166000908152600260209081526040808320938616835292905290812054808311156103b857600160a060020a0333811660009081526002602090815260408083209388168352929052908120556103ef565b6103c8818463ffffffff61061516565b600160a060020a033381166000908152600260209081526040808320938916835292905220555b600160a060020a0333811660008181526002602090815260408083209489168084529490915290819020547f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925915190815260200160405180910390a35060019392505050565b600160a060020a031660009081526001602052604090205490565b6000600160a060020a038316151561048757600080fd5b600160a060020a0333166000908152600160205260409020546104b0908363ffffffff61061516565b600160a060020a0333811660009081526001602052604080822093909355908516815220546104e5908363ffffffff61062716565b600160a060020a0380851660008181526001602052604090819020939093559133909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a350600192915050565b600160a060020a03338116600090815260026020908152604080832093861683529290529081205461057e908363ffffffff61062716565b600160a060020a0333811660008181526002602090815260408083209489168084529490915290819020849055919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591905190815260200160405180910390a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b60008282111561062157fe5b50900390565b60008282018381101561063657fe5b93925050505600a165627a7a72305820cf4f1c3380b05f9c6790be146f1df0f17045ce3a110bc8645dd90c1025a3aff90029", "sourceMap": "345:3095:27:-;;;;;;;;;;;;;;;;;", "deployedSourceMap": "345:3095:27:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1884:183;;;;;;;;;;-1:-1:-1;;;;;1884:183:27;;;;;;;;;;;;;;;;;;;;;;;;179:26:25;;;;;;;;;;;;;;;;;;;;;;;;;;;728:533:27;;;;;;;;;;-1:-1:-1;;;;;728:533:27;;;;;;;;;;;;3033:404;;;;;;;;;;-1:-1:-1;;;;;3033:404:27;;;;;;;973:111:22;;;;;;;;;;-1:-1:-1;;;;;973:111:22;;;;;437:334;;;;;;;;;;-1:-1:-1;;;;;437:334:22;;;;;;;2766:263:27;;;;;;;;;;-1:-1:-1;;;;;2766:263:27;;;;;;;2386:140;;;;;;;;;;-1:-1:-1;;;;;2386:140:27;;;;;;;;;;1884:183;-1:-1:-1;;;;;1971:10:27;1963:19;;1951:4;1963:19;;;:7;:19;;;;;;;;:29;;;;;;;;;;;;;:38;;;1951:4;;1963:29;:19;2007:38;;1995:6;;2007:38;;;;;;;;;;;;;-1:-1:-1;2058:4:27;1884:183;;;;:::o;179:26:25:-;;;;:::o;728:533:27:-;810:4;;-1:-1:-1;;;;;830:17:27;;;;822:26;;;;;;-1:-1:-1;;;;;;876:14:27;;;;;;;:7;:14;;;;;;;;891:10;876:26;;;;;;;;;;;;1074:15;;;:8;:15;;;;;;;:27;;1094:6;1074:27;:19;:27;:::i;:::-;-1:-1:-1;;;;;1056:15:27;;;;;;;:8;:15;;;;;;:45;;;;1123:13;;;;;;;:25;;1141:6;1123:25;:17;:25;:::i;:::-;-1:-1:-1;;;;;1107:13:27;;;;;;:8;:13;;;;;:41;1183:22;:10;1198:6;1183:22;:14;:22;:::i;:::-;-1:-1:-1;;;;;1154:14:27;;;;;;;:7;:14;;;;;;;;1169:10;1154:26;;;;;;;;;;;:51;;;;1211:28;;;;;;1232:6;;1211:28;;;;;;;;;;;;;-1:-1:-1;1252:4:27;;728:533;-1:-1:-1;;;;728:533:27:o;3033:404::-;-1:-1:-1;;;;;3158:10:27;3150:19;;3114:12;3150:19;;;:7;:19;;;;;;;;:29;;;;;;;;;;;;3189:27;;;3185:164;;;-1:-1:-1;;;;;3234:10:27;3226:19;;3258:1;3226:19;;;:7;:19;;;;;;;;:29;;;;;;;;;;;:33;3185:164;;;3312:30;:8;3325:16;3312:30;:12;:30;:::i;:::-;-1:-1:-1;;;;;3288:10:27;3280:19;;;;;;:7;:19;;;;;;;;:29;;;;;;;;;:62;3185:164;-1:-1:-1;;;;;3363:10:27;3354:61;;3385:19;;;;:7;:19;;;;;;;;3354:61;;;3385:29;;;;;;;;;;;;3354:61;;;;;;;;;;;;;;;-1:-1:-1;3428:4:27;;3033:404;-1:-1:-1;;;3033:404:27:o;973:111:22:-;-1:-1:-1;;;;;1063:16:22;1033:15;1063:16;;;:8;:16;;;;;;;973:111::o;437:334::-;500:4;-1:-1:-1;;;;;520:17:22;;;;512:26;;;;;;-1:-1:-1;;;;;640:10:22;631:20;;;;;:8;:20;;;;;;:32;;656:6;631:32;:24;:32;:::i;:::-;-1:-1:-1;;;;;617:10:22;608:20;;;;;;:8;:20;;;;;;:55;;;;685:13;;;;;;;:25;;703:6;685:25;:17;:25;:::i;:::-;-1:-1:-1;;;;;669:13:22;;;;;;;:8;:13;;;;;;;:41;;;;:13;725:10;716:33;;;;;;742:6;;716:33;;;;;;;;;;;;;-1:-1:-1;762:4:22;437:334;;;;:::o;2766:263:27:-;-1:-1:-1;;;;;2902:10:27;2894:19;;2842:12;2894:19;;;:7;:19;;;;;;;;:29;;;;;;;;;;;;:46;;2928:11;2894:46;:33;:46;:::i;:::-;-1:-1:-1;;;;;2870:10:27;2862:19;;;;;;:7;:19;;;;;;;;:29;;;;;;;;;;;;;;:78;;;:29;;:19;;2946:61;;2862:78;2946:61;;;;;;;;;;;;;-1:-1:-1;3020:4:27;2766:263;;;;:::o;2386:140::-;-1:-1:-1;;;;;2496:15:27;;;2464:17;2496:15;;;:7;:15;;;;;;;;:25;;;;;;;;;;;;;2386:140::o;562:114:20:-;624:7;646:6;;;;639:14;;;;-1:-1:-1;666:5:20;;;562:114::o;680:133::-;742:7;769:5;;;787:6;;;;780:14;;;;807:1;680:133;-1:-1:-1;;;680:133:20:o", "source": "pragma solidity ^0.4.11;\n\n\nimport './BasicToken.sol';\nimport './ERC20.sol';\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n\n uint256 _allowance = allowed[_from][msg.sender];\n\n // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met\n // require (_value <= _allowance);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = _allowance.sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public constant returns (uint256 remaining) {\n return allowed[_owner][_spender];\n }\n\n /**\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n */\n function increaseApproval (address _spender, uint _addedValue)\n returns (bool success) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n function decreaseApproval (address _spender, uint _subtractedValue)\n returns (bool success) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n", "sourcePath": "zeppelin-solidity/contracts/token/StandardToken.sol", "ast": { "attributes": { "absolutePath": "zeppelin-solidity/contracts/token/StandardToken.sol", "exportedSymbols": { "StandardToken": [ 3226 ] } }, "children": [ { "attributes": { "literals": [ "solidity", "^", "0.4", ".11" ] }, "id": 2997, "name": "PragmaDirective", "src": "0:24:27" }, { "attributes": { "SourceUnit": 2781, "absolutePath": "zeppelin-solidity/contracts/token/BasicToken.sol", "file": "./BasicToken.sol", "scope": 3227, "symbolAliases": [ null ], "unitAlias": "" }, "id": 2998, "name": "ImportDirective", "src": "27:26:27" }, { "attributes": { "SourceUnit": 2876, "absolutePath": "zeppelin-solidity/contracts/token/ERC20.sol", "file": "./ERC20.sol", "scope": 3227, "symbolAliases": [ null ], "unitAlias": "" }, "id": 2999, "name": "ImportDirective", "src": "54:21:27" }, { "attributes": { "contractDependencies": [ 2780, 2875, 2904 ], "contractKind": "contract", "documentation": "@title Standard ERC20 token\n * @dev Implementation of the basic standard token.\n@dev https://github.com/ethereum/EIPs/issues/20\n@dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol", "fullyImplemented": true, "linearizedBaseContracts": [ 3226, 2780, 2875, 2904 ], "name": "StandardToken", "scope": 3227 }, "children": [ { "attributes": { "arguments": [ null ] }, "children": [ { "attributes": { "contractScope": null, "name": "ERC20", "referencedDeclaration": 2875, "type": "contract ERC20" }, "id": 3000, "name": "UserDefinedTypeName", "src": "371:5:27" } ], "id": 3001, "name": "InheritanceSpecifier", "src": "371:5:27" }, { "attributes": { "arguments": [ null ] }, "children": [ { "attributes": { "contractScope": null, "name": "BasicToken", "referencedDeclaration": 2780, "type": "contract BasicToken" }, "id": 3002, "name": "UserDefinedTypeName", "src": "378:10:27" } ], "id": 3003, "name": "InheritanceSpecifier", "src": "378:10:27" }, { "attributes": { "constant": false, "name": "allowed", "scope": 3226, "stateVariable": true, "storageLocation": "default", "type": "mapping(address => mapping(address => uint256))", "value": null, "visibility": "internal" }, "children": [ { "attributes": { "type": "mapping(address => mapping(address => uint256))" }, "children": [ { "attributes": { "name": "address", "type": "address" }, "id": 3004, "name": "ElementaryTypeName", "src": "403:7:27" }, { "attributes": { "type": "mapping(address => uint256)" }, "children": [ { "attributes": { "name": "address", "type": "address" }, "id": 3005, "name": "ElementaryTypeName", "src": "423:7:27" }, { "attributes": { "name": "uint256", "type": "uint256" }, "id": 3006, "name": "ElementaryTypeName", "src": "434:7:27" } ], "id": 3007, "name": "Mapping", "src": "414:28:27" } ], "id": 3008, "name": "Mapping", "src": "394:49:27" } ], "id": 3009, "name": "VariableDeclaration", "src": "394:57:27" }, { "attributes": { "constant": false, "implemented": true, "isConstructor": false, "modifiers": [ null ], "name": "transferFrom", "payable": false, "scope": 3226, "stateMutability": "nonpayable", "superFunction": 2857, "visibility": "public" }, "children": [ { "children": [ { "attributes": { "constant": false, "name": "_from", "scope": 3080, "stateVariable": false, "storageLocation": "default", "type": "address", "value": null, "visibility": "internal" }, "children": [ { "attributes": { "name": "address", "type": "address" }, "id": 3010, "name": "ElementaryTypeName", "src": "750:7:27" } ], "id": 3011, "name": "VariableDeclaration", "src": "750:13:27" }, { "attributes": { "constant": false, "name": "_to", "scope": 3080, "stateVariable": false, "storageLocation": "default", "type": "address", "value": null, "visibility": "internal" }, "children": [ { "attributes": { "name": "address", "type": "address" }, "id": 3012, "name": "ElementaryTypeName", "src": "765:7:27" } ], "id": 3013, "name": "VariableDeclaration", "src": "765:11:27" }, { "attributes": { "constant": false, "name": "_value", "scope": 3080, "stateVariable": false, "storageLocation": "default", "type": "uint256", "value": null, "visibility": "internal" }, "children": [ { "attributes": { "name": "uint256", "type": "uint256" }, "id": 3014, "name": "ElementaryTypeName", "src": "778:7:27" } ], "id": 3015, "name": "VariableDeclaration", "src": "778:14:27" } ], "id": 3016, "name": "ParameterList", "src": "749:44:27" }, { "children": [ { "attributes": { "constant": false, "name": "", "scope": 3080, "stateVariable": false, "storageLocation": "default", "type": "bool", "value": null, "visibility": "internal" }, "children": [ { "attributes": { "name": "bool", "type": "bool" }, "id": 3017, "name": "ElementaryTypeName", "src": "810:4:27" } ], "id": 3018, "name": "VariableDeclaration", "src": "810:4:27" } ], "id": 3019, "name": "ParameterList", "src": "809:6:27" }, { "children": [ { "children": [ { "attributes": { "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, "isStructConstructorCall": false, "lValueRequested": false, "names": [ null ], "type": "tuple()", "type_conversion": false }, "children": [ { "attributes": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "overloadedDeclarations": [ null ], "referencedDeclaration": 3241, "type": "function (bool) pure", "value": "require" }, "id": 3020, "name": "Identifier", "src": "822:7:27" }, { "attributes": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "operator": "!=", "type": "bool" }, "children": [ { "attributes": { "argumentTypes": null, "overloadedDeclarations": [ null ], "referencedDeclaration": 3013, "type": "address", "value": "_to" }, "id": 3021, "name": "Identifier", "src": "830:3:27" }, { "attributes": { "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": true, "isStructConstructorCall": false, "lValueRequested": false, "names": [ null ], "type": "address", "type_conversion": true }, "children": [ { "attributes": { "argumentTypes": [ { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" } ], "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "type": "type(address)", "value": "address" }, "id": 3022, "name": "ElementaryTypeNameExpression", "src": "837:7:27" }, { "attributes": { "argumentTypes": null, "hexvalue": "30", "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "subdenomination": null, "token": "number", "type": "int_const 0", "value": "0" }, "id": 3023, "name": "Literal", "src": "845:1:27" } ], "id": 3024, "name": "FunctionCall", "src": "837:10:27" } ], "id": 3025, "name": "BinaryOperation", "src": "830:17:27" } ], "id": 3026, "name": "FunctionCall", "src": "822:26:27" } ], "id": 3027, "name": "ExpressionStatement", "src": "822:26:27" }, { "attributes": { "assignments": [ 3029 ] }, "children": [ { "attributes": { "constant": false, "name": "_allowance", "scope": 3080, "stateVariable": false, "storageLocation": "default", "type": "uint256", "value": null, "visibility": "internal" }, "children": [ { "attributes": { "name": "uint256", "type": "uint256" }, "id": 3028, "name": "ElementaryTypeName", "src": "855:7:27" } ], "id": 3029, "name": "VariableDeclaration", "src": "855:18:27" }, { "attributes": { "argumentTypes": null, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "type": "uint256" }, "children": [ { "attributes": { "argumentTypes": null, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "type": "mapping(address => uint256)" }, "children": [ { "attributes": { "argumentTypes": null, "overloadedDeclarations": [ null ], "referencedDeclaration": 3009, "type": "mapping(address => mapping(address => uint256))", "value": "allowed" }, "id": 3030, "name": "Identifier", "src": "876:7:27" }, { "attributes": { "argumentTypes": null, "overloadedDeclarations": [ null ], "referencedDeclaration": 3011, "type": "address", "value": "_from" }, "id": 3031, "name": "Identifier", "src": "884:5:27" } ], "id": 3032, "name": "IndexAccess", "src": "876:14:27" }, { "attributes": { "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "member_name": "sender", "referencedDeclaration": null, "type": "address" }, "children": [ { "attributes": { "argumentTypes": null, "overloadedDeclarations": [ null ], "referencedDeclaration": 3238, "type": "msg", "value": "msg" }, "id": 3033, "name": "Identifier", "src": "891:3:27" } ], "id": 3034, "name": "MemberAccess", "src": "891:10:27" } ], "id": 3035, "name": "IndexAccess", "src": "876:26:27" } ], "id": 3036, "name": "VariableDeclarationStatement", "src": "855:47:27" }, { "children": [ { "attributes": { "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "operator": "=", "type": "uint256" }, "children": [ { "attributes": { "argumentTypes": null, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "type": "uint256" }, "children": [ { "attributes": { "argumentTypes": null, "overloadedDeclarations": [ null ], "referencedDeclaration": 2716, "type": "mapping(address => uint256)", "value": "balances" }, "id": 3037, "name": "Identifier", "src": "1056:8:27" }, { "attributes": { "argumentTypes": null, "overloadedDeclarations": [ null ], "referencedDeclaration": 3011, "type": "address", "value": "_from" }, "id": 3038, "name": "Identifier", "src": "1065:5:27" } ], "id": 3039, "name": "IndexAccess", "src": "1056:15:27" }, { "attributes": { "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, "isStructConstructorCall": false, "lValueRequested": false, "names": [ null ], "type": "uint256", "type_conversion": false }, "children": [ { "attributes": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "member_name": "sub", "referencedDeclaration": 2622, "type": "function (uint256,uint256) view returns (uint256)" }, "children": [ { "attributes": { "argumentTypes": null, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "type": "uint256" }, "children": [ { "attributes": { "argumentTypes": null, "overloadedDeclarations": [ null ], "referencedDeclaration": 2716, "type": "mapping(address => uint256)", "value": "balances" }, "id": 3040, "name": "Identifier", "src": "1074:8:27" }, { "attributes": { "argumentTypes": null, "overloadedDeclarations": [ null ], "referencedDeclaration": 3011, "type": "address", "value": "_from" }, "id": 3041, "name": "Identifier", "src": "1083:5:27" } ], "id": 3042, "name": "IndexAccess", "src": "1074:15:27" } ], "id": 3043, "name": "MemberAccess", "src": "1074:19:27" }, { "attributes": { "argumentTypes": null, "overloadedDeclarations": [ null ], "referencedDeclaration": 3015, "type": "uint256", "value": "_value" }, "id": 3044, "name": "Identifier", "src": "1094:6:27" } ], "id": 3045, "name": "FunctionCall", "src": "1074:27:27" } ], "id": 3046, "name": "Assignment", "src": "1056:45:27" } ], "id": 3047, "name": "ExpressionStatement", "src": "1056:45:27" }, { "children": [ { "attributes": { "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "operator": "=", "type": "uint256" }, "children": [ { "attributes": { "argumentTypes": null, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "type": "uint256" }, "children": [ { "attributes": { "argumentTypes": null, "overloadedDeclarations": [ null ], "referencedDeclaration": 2716, "type": "mapping(address => uint256)", "value": "balances" }, "id": 3048, "name": "Identifier", "src": "1107:8:27" }, { "attributes": { "argumentTypes": null, "overloadedDeclarations": [ null ], "referencedDeclaration": 3013, "type": "address", "value": "_to" }, "id": 3049, "name": "Identifier", "src": "1116:3:27" } ], "id": 3050, "name": "IndexAccess", "src": "1107:13:27" }, { "attributes": { "argumentTypes": null, "isConstant": false, "isLValue": false, "isPure": false, "isStructConstructorCall": false, "lValueRequested": false, "names": [ null ], "type": "uint256",