UNPKG

@josojo/tokenized-events

Version:
1,126 lines 237 kB
{ "contractName": "StandardTokenData", "abi": [ { "constant": true, "inputs": [], "name": "name", "outputs": [ { "name": "", "type": "string" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "name": "", "type": "address" } ], "name": "balances", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "decimals", "outputs": [ { "name": "", "type": "uint8" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "name": "", "type": "address" }, { "name": "", "type": "address" } ], "name": "allowances", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "totalTokens", "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" } ], "bytecode": "0x60c0604052600a60808190527f546f6b656e204e616d650000000000000000000000000000000000000000000060a090815261003e9160009190610096565b506040805180820190915260038082527f53594d0000000000000000000000000000000000000000000000000000000000602090920191825261008391600191610096565b5034801561009057600080fd5b50610131565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100d757805160ff1916838001178555610104565b82800160010185558215610104579182015b828111156101045782518255916020019190600101906100e9565b50610110929150610114565b5090565b61012e91905b80821115610110576000815560010161011a565b90565b61031d806101406000396000f3006080604052600436106100775763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde03811461007c57806327e235e314610106578063313ce5671461014657806355b6ed5c146101715780637e1c0c09146101a557806395d89b41146101ba575b600080fd5b34801561008857600080fd5b506100916101cf565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100cb5781810151838201526020016100b3565b50505050905090810190601f1680156100f85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561011257600080fd5b5061013473ffffffffffffffffffffffffffffffffffffffff6004351661025d565b60408051918252519081900360200190f35b34801561015257600080fd5b5061015b61026f565b6040805160ff9092168252519081900360200190f35b34801561017d57600080fd5b5061013473ffffffffffffffffffffffffffffffffffffffff60043581169060243516610274565b3480156101b157600080fd5b50610134610291565b3480156101c657600080fd5b50610091610297565b6000805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156102555780601f1061022a57610100808354040283529160200191610255565b820191906000526020600020905b81548152906001019060200180831161023857829003601f168201915b505050505081565b60026020526000908152604090205481565b601281565b600360209081526000928352604080842090915290825290205481565b60045481565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156102555780601f1061022a576101008083540402835291602001916102555600a165627a7a7230582075d51ef4726389f05dce7cff563177d31e4bda57d1adc878142e645f8b5002db0029", "deployedBytecode": "0x6080604052600436106100775763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde03811461007c57806327e235e314610106578063313ce5671461014657806355b6ed5c146101715780637e1c0c09146101a557806395d89b41146101ba575b600080fd5b34801561008857600080fd5b506100916101cf565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100cb5781810151838201526020016100b3565b50505050905090810190601f1680156100f85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561011257600080fd5b5061013473ffffffffffffffffffffffffffffffffffffffff6004351661025d565b60408051918252519081900360200190f35b34801561015257600080fd5b5061015b61026f565b6040805160ff9092168252519081900360200190f35b34801561017d57600080fd5b5061013473ffffffffffffffffffffffffffffffffffffffff60043581169060243516610274565b3480156101b157600080fd5b50610134610291565b3480156101c657600080fd5b50610091610297565b6000805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156102555780601f1061022a57610100808354040283529160200191610255565b820191906000526020600020905b81548152906001019060200180831161023857829003601f168201915b505050505081565b60026020526000908152604090205481565b601281565b600360209081526000928352604080842090915290825290205481565b60045481565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156102555780601f1061022a576101008083540402835291602001916102555600a165627a7a7230582075d51ef4726389f05dce7cff563177d31e4bda57d1adc878142e645f8b5002db0029", "sourceMap": "234:34:9:-;169:326;234:34;;169:326;234:34;;;;;;;;;;-1:-1:-1;;234:34:9;;:::i;:::-;-1:-1:-1;274:28:9;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;169:326;8:9:-1;5:2;;;30:1;27;20:12;5:2;169:326:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;169:326:9;;;-1:-1:-1;169:326:9;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;", "deployedSourceMap": "169:326:9:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;234:34;;8:9:-1;5:2;;;30:1;27;20:12;5:2;234:34:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;234:34:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;352:41;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;352:41:9;;;;;;;;;;;;;;;;;;;;;;;308:35;;8:9:-1;5:2;;;30:1;27;20:12;5:2;308:35:9;;;;;;;;;;;;;;;;;;;;;;;399:64;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;399:64:9;;;;;;;;;;;;469:23;;8:9:-1;5:2;;;30:1;27;20:12;5:2;469:23:9;;;;274:28;;8:9:-1;5:2;;;30:1;27;20:12;5:2;274:28:9;;;;234:34;;;;;;;;;;;;;;;-1:-1:-1;;234:34:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;352:41::-;;;;;;;;;;;;;:::o;308:35::-;341:2;308:35;:::o;399:64::-;;;;;;;;;;;;;;;;;;;;;;;;:::o;469:23::-;;;;:::o;274:28::-;;;;;;;;;;;;;;;-1:-1:-1;;274:28:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;", "source": "pragma solidity ^0.4.24;\nimport \"@gnosis.pm/pm-contracts/contracts/Tokens/Token.sol\";\nimport \"@gnosis.pm/pm-contracts/contracts/Utils/Math.sol\";\nimport \"./Proxy.sol\";\n\n\ncontract StandardTokenData {\n\n /*\n * Storage\n */\n string public name = \"Token Name\";\n string public symbol = \"SYM\";\n uint8 public constant decimals = 18; \n\n mapping (address => uint) public balances;\n mapping (address => mapping (address => uint)) public allowances;\n uint public totalTokens;\n}\n\n/// @title Standard token contract with overflow protection\ncontract StandardToken is Token, StandardTokenData {\n using Math for *;\n\n /*\n * Public functions\n */\n /// @dev Transfers sender's tokens to a given address. Returns success\n /// @param to Address of token receiver\n /// @param value Number of tokens to transfer\n /// @return Was transfer successful?\n function transfer(address to, uint value)\n public\n returns (bool)\n {\n if ( !balances[msg.sender].safeToSub(value)\n || !balances[to].safeToAdd(value))\n return false;\n balances[msg.sender] -= value;\n balances[to] += value;\n emit Transfer(msg.sender, to, value);\n return true;\n }\n\n /// @dev Allows allowed third party to transfer tokens from one address to another. Returns success\n /// @param from Address from where tokens are withdrawn\n /// @param to Address to where tokens are sent\n /// @param value Number of tokens to transfer\n /// @return Was transfer successful?\n function transferFrom(address from, address to, uint value)\n public\n returns (bool)\n {\n if ( !balances[from].safeToSub(value)\n || !allowances[from][msg.sender].safeToSub(value)\n || !balances[to].safeToAdd(value))\n return false;\n balances[from] -= value;\n allowances[from][msg.sender] -= value;\n balances[to] += value;\n emit Transfer(from, to, value);\n return true;\n }\n\n /// @dev Sets approved amount of tokens for spender. Returns success\n /// @param spender Address of allowed account\n /// @param value Number of approved tokens\n /// @return Was approval successful?\n function approve(address spender, uint value)\n public\n returns (bool)\n {\n allowances[msg.sender][spender] = value;\n emit Approval(msg.sender, spender, value);\n return true;\n }\n\n /// @dev Returns number of allowed tokens for given address\n /// @param owner Address of token owner\n /// @param spender Address of token spender\n /// @return Remaining allowance for spender\n function allowance(address owner, address spender)\n public\n view\n returns (uint)\n {\n return allowances[owner][spender];\n }\n\n /// @dev Returns number of tokens owned by given address\n /// @param owner Address of token owner\n /// @return Balance of owner\n function balanceOf(address owner)\n public\n view\n returns (uint)\n {\n return balances[owner];\n }\n\n /// @dev Returns total supply of tokens\n /// @return Total supply\n function totalSupply()\n public\n view\n returns (uint)\n {\n return totalTokens;\n }\n}", "sourcePath": "/home/josojo/reality/tokenized-events/contracts/StandardToken.sol", "ast": { "absolutePath": "/home/josojo/reality/tokenized-events/contracts/StandardToken.sol", "exportedSymbols": { "StandardToken": [ 2634 ], "StandardTokenData": [ 2442 ] }, "id": 2635, "nodeType": "SourceUnit", "nodes": [ { "id": 2417, "literals": [ "solidity", "^", "0.4", ".24" ], "nodeType": "PragmaDirective", "src": "0:24:9" }, { "absolutePath": "@gnosis.pm/pm-contracts/contracts/Tokens/Token.sol", "file": "@gnosis.pm/pm-contracts/contracts/Tokens/Token.sol", "id": 2418, "nodeType": "ImportDirective", "scope": 2635, "sourceUnit": 2704, "src": "25:60:9", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "@gnosis.pm/pm-contracts/contracts/Utils/Math.sol", "file": "@gnosis.pm/pm-contracts/contracts/Utils/Math.sol", "id": 2419, "nodeType": "ImportDirective", "scope": 2635, "sourceUnit": 3955, "src": "86:58:9", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/josojo/reality/tokenized-events/contracts/Proxy.sol", "file": "./Proxy.sol", "id": 2420, "nodeType": "ImportDirective", "scope": 2635, "sourceUnit": 1734, "src": "145:21:9", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 2442, "linearizedBaseContracts": [ 2442 ], "name": "StandardTokenData", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 2423, "name": "name", "nodeType": "VariableDeclaration", "scope": 2442, "src": "234:34:9", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string" }, "typeName": { "id": 2421, "name": "string", "nodeType": "ElementaryTypeName", "src": "234:6:9", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": { "argumentTypes": null, "hexValue": "546f6b656e204e616d65", "id": 2422, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "256:12:9", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_dc32e0fccaa9abc60d9a9949a547123752741b95bb933f41716a497054123347", "typeString": "literal_string \"Token Name\"" }, "value": "Token Name" }, "visibility": "public" }, { "constant": false, "id": 2426, "name": "symbol", "nodeType": "VariableDeclaration", "scope": 2442, "src": "274:28:9", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_storage", "typeString": "string" }, "typeName": { "id": 2424, "name": "string", "nodeType": "ElementaryTypeName", "src": "274:6:9", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": { "argumentTypes": null, "hexValue": "53594d", "id": 2425, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "297:5:9", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_4d3015a52e62e7dc6887dd6869969b57532cf58982b1264ed2b19809b668f8e5", "typeString": "literal_string \"SYM\"" }, "value": "SYM" }, "visibility": "public" }, { "constant": true, "id": 2429, "name": "decimals", "nodeType": "VariableDeclaration", "scope": 2442, "src": "308:35:9", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" }, "typeName": { "id": 2427, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "308:5:9", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "value": { "argumentTypes": null, "hexValue": "3138", "id": 2428, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "341:2:9", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_18_by_1", "typeString": "int_const 18" }, "value": "18" }, "visibility": "public" }, { "constant": false, "id": 2433, "name": "balances", "nodeType": "VariableDeclaration", "scope": 2442, "src": "352:41:9", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "typeName": { "id": 2432, "keyType": { "id": 2430, "name": "address", "nodeType": "ElementaryTypeName", "src": "361:7:9", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", "src": "352:25:9", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "valueType": { "id": 2431, "name": "uint", "nodeType": "ElementaryTypeName", "src": "372:4:9", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } }, "value": null, "visibility": "public" }, { "constant": false, "id": 2439, "name": "allowances", "nodeType": "VariableDeclaration", "scope": 2442, "src": "399:64:9", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", "typeString": "mapping(address => mapping(address => uint256))" }, "typeName": { "id": 2438, "keyType": { "id": 2434, "name": "address", "nodeType": "ElementaryTypeName", "src": "408:7:9", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", "src": "399:46:9", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", "typeString": "mapping(address => mapping(address => uint256))" }, "valueType": { "id": 2437, "keyType": { "id": 2435, "name": "address", "nodeType": "ElementaryTypeName", "src": "428:7:9", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", "src": "419:25:9", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "valueType": { "id": 2436, "name": "uint", "nodeType": "ElementaryTypeName", "src": "439:4:9", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } } }, "value": null, "visibility": "public" }, { "constant": false, "id": 2441, "name": "totalTokens", "nodeType": "VariableDeclaration", "scope": 2442, "src": "469:23:9", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2440, "name": "uint", "nodeType": "ElementaryTypeName", "src": "469:4:9", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "public" } ], "scope": 2635, "src": "169:326:9" }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 2443, "name": "Token", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 2703, "src": "583:5:9", "typeDescriptions": { "typeIdentifier": "t_contract$_Token_$2703", "typeString": "contract Token" } }, "id": 2444, "nodeType": "InheritanceSpecifier", "src": "583:5:9" }, { "arguments": null, "baseName": { "contractScope": null, "id": 2445, "name": "StandardTokenData", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 2442, "src": "590:17:9", "typeDescriptions": { "typeIdentifier": "t_contract$_StandardTokenData_$2442", "typeString": "contract StandardTokenData" } }, "id": 2446, "nodeType": "InheritanceSpecifier", "src": "590:17:9" } ], "contractDependencies": [ 2442, 2703 ], "contractKind": "contract", "documentation": "@title Standard token contract with overflow protection", "fullyImplemented": true, "id": 2634, "linearizedBaseContracts": [ 2634, 2442, 2703 ], "name": "StandardToken", "nodeType": "ContractDefinition", "nodes": [ { "id": 2448, "libraryName": { "contractScope": null, "id": 2447, "name": "Math", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 3954, "src": "620:4:9", "typeDescriptions": { "typeIdentifier": "t_contract$_Math_$3954", "typeString": "library Math" } }, "nodeType": "UsingForDirective", "src": "614:17:9", "typeName": null }, { "body": { "id": 2498, "nodeType": "Block", "src": "971:271:9", "statements": [ { "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_bool", "typeString": "bool" }, "id": 2472, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 2464, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "988:38:9", "subExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 2462, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2452, "src": "1020:5:9", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 2457, "name": "balances", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2433, "src": "989:8:9", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 2460, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 2458, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8523, "src": "998:3:9", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 2459, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "998:10:9", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "989:20:9", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 2461, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "safeToSub", "nodeType": "MemberAccess", "referencedDeclaration": 3717, "src": "989:30:9", "typeDescriptions": { "typeIdentifier": "t_function_delegatecall_view$_t_uint256_$_t_uint256_$returns$_t_bool_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) view returns (bool)" } }, "id": 2463, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "989:37:9", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "BinaryOperation", "operator": "||", "rightExpression": { "argumentTypes": null, "id": 2471, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "!", "prefix": true, "src": "1042:30:9", "subExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 2469, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2452, "src": "1066:5:9", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 2465, "name": "balances", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2433, "src": "1043:8:9", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 2467, "indexExpression": { "argumentTypes": null, "id": 2466, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2450, "src": "1052:2:9", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "1043:12:9", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 2468, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "safeToAdd", "nodeType": "MemberAccess", "referencedDeclaration": 3703, "src": "1043:22:9", "typeDescriptions": { "typeIdentifier": "t_function_delegatecall_view$_t_uint256_$_t_uint256_$returns$_t_bool_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) view returns (bool)" } }, "id": 2470, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1043:29:9", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "src": "988:84:9", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "falseBody": null, "id": 2475, "nodeType": "IfStatement", "src": "981:117:9", "trueBody": { "expression": { "argumentTypes": null, "hexValue": "66616c7365", "id": 2473, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "1093:5:9", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "false" }, "functionReturnParameters": 2456, "id": 2474, "nodeType": "Return", "src": "1086:12:9" } }, { "expression": { "argumentTypes": null, "id": 2481, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 2476, "name": "balances", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2433, "src": "1108:8:9", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 2479, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 2477, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8523, "src": "1117:3:9", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 2478, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "1117:10:9", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "1108:20:9", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "-=", "rightHandSide": { "argumentTypes": null, "id": 2480, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2452, "src": "1132:5:9", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1108:29:9", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 2482, "nodeType": "ExpressionStatement", "src": "1108:29:9" }, { "expression": { "argumentTypes": null, "id": 2487, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 2483, "name": "balances", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2433, "src": "1147:8:9", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 2485, "indexExpression": { "argumentTypes": null, "id": 2484, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2450, "src": "1156:2:9", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "1147:12:9", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "+=", "rightHandSide": { "argumentTypes": null, "id": 2486, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2452, "src": "1163:5:9", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1147:21:9", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 2488, "nodeType": "ExpressionStatement", "src": "1147:21:9" }, { "eventCall": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 2490, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 8523, "src": "1192:3:9", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 2491, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "1192:10:9", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 2492, "name": "to", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2450, "src": "1204:2:9", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 2493, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2452, "src": "1208:5:9", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 2489, "name": "Transfer", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2644, "src": "1183:8:9", "typeDescriptions": { "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,address,uint256)" } }, "id": 2494, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1183:31:9", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 2495, "nodeType": "EmitStatement", "src": "1178:36:9" }, { "expression": { "argumentTypes": null, "hexValue": "74727565", "id": 2496, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "1231:4:9", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, "functionReturnParameters": 2456, "id": 2497, "nodeType": "Return", "src": "1224:11:9" } ] }, "documentation": "@dev Transfers sender's tokens to a given address. Returns success\n @param to Address of token receiver\n @param value Number of tokens to transfer\n @return Was transfer successful?", "id": 2499, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [], "name": "transfer", "nodeType": "FunctionDefinition", "parameters": { "id": 2453, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2450, "name": "to", "nodeType": "VariableDeclaration", "scope": 2499, "src": "905:10:9", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2449, "name"