@josojo/realitytoken-contracts
Version:
realitytoken basic contracts
1,126 lines • 237 kB
JSON
{
"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:5:-;169:326;234:34;;169:326;234:34;;;;;;;;;;-1:-1:-1;;234:34:5;;:::i;:::-;-1:-1:-1;274:28:5;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;169:326;8:9:-1;5:2;;;30:1;27;20:12;5:2;169:326:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;169:326:5;;;-1:-1:-1;169:326:5;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;",
"deployedSourceMap": "169:326:5:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;234:34;;8:9:-1;5:2;;;30:1;27;20:12;5:2;234:34:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;352:41;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;352:41:5;;;;;;;;;;;;;;;;;;;;;;;308:35;;8:9:-1;5:2;;;30:1;27;20:12;5:2;308:35:5;;;;;;;;;;;;;;;;;;;;;;;399:64;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;399:64:5;;;;;;;;;;;;469:23;;8:9:-1;5:2;;;30:1;27;20:12;5:2;469:23:5;;;;274:28;;8:9:-1;5:2;;;30:1;27;20:12;5:2;274:28:5;;;;234:34;;;;;;;;;;;;;;;-1:-1:-1;;234:34:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;352:41::-;;;;;;;;;;;;;:::o;308:35::-;341:2;308:35;:::o;399:64::-;;;;;;;;;;;;;;;;;;;;;;;;:::o;469:23::-;;;;:::o;274:28::-;;;;;;;;;;;;;;;-1:-1:-1;;274:28:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;",
"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": [
1387
],
"StandardTokenData": [
1195
]
},
"id": 1388,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1170,
"literals": [
"solidity",
"^",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:24:5"
},
{
"absolutePath": "@gnosis.pm/pm-contracts/contracts/Tokens/Token.sol",
"file": "@gnosis.pm/pm-contracts/contracts/Tokens/Token.sol",
"id": 1171,
"nodeType": "ImportDirective",
"scope": 1388,
"sourceUnit": 3361,
"src": "25:60:5",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "@gnosis.pm/pm-contracts/contracts/Utils/Math.sol",
"file": "@gnosis.pm/pm-contracts/contracts/Utils/Math.sol",
"id": 1172,
"nodeType": "ImportDirective",
"scope": 1388,
"sourceUnit": 4612,
"src": "86:58:5",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/josojo/reality/tokenized-events/contracts/Proxy.sol",
"file": "./Proxy.sol",
"id": 1173,
"nodeType": "ImportDirective",
"scope": 1388,
"sourceUnit": 487,
"src": "145:21:5",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 1195,
"linearizedBaseContracts": [
1195
],
"name": "StandardTokenData",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 1176,
"name": "name",
"nodeType": "VariableDeclaration",
"scope": 1195,
"src": "234:34:5",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string"
},
"typeName": {
"id": 1174,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "234:6:5",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": {
"argumentTypes": null,
"hexValue": "546f6b656e204e616d65",
"id": 1175,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "256:12:5",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_dc32e0fccaa9abc60d9a9949a547123752741b95bb933f41716a497054123347",
"typeString": "literal_string \"Token Name\""
},
"value": "Token Name"
},
"visibility": "public"
},
{
"constant": false,
"id": 1179,
"name": "symbol",
"nodeType": "VariableDeclaration",
"scope": 1195,
"src": "274:28:5",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_string_storage",
"typeString": "string"
},
"typeName": {
"id": 1177,
"name": "string",
"nodeType": "ElementaryTypeName",
"src": "274:6:5",
"typeDescriptions": {
"typeIdentifier": "t_string_storage_ptr",
"typeString": "string"
}
},
"value": {
"argumentTypes": null,
"hexValue": "53594d",
"id": 1178,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "297:5:5",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_4d3015a52e62e7dc6887dd6869969b57532cf58982b1264ed2b19809b668f8e5",
"typeString": "literal_string \"SYM\""
},
"value": "SYM"
},
"visibility": "public"
},
{
"constant": true,
"id": 1182,
"name": "decimals",
"nodeType": "VariableDeclaration",
"scope": 1195,
"src": "308:35:5",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 1180,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "308:5:5",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"value": {
"argumentTypes": null,
"hexValue": "3138",
"id": 1181,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "341:2:5",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_18_by_1",
"typeString": "int_const 18"
},
"value": "18"
},
"visibility": "public"
},
{
"constant": false,
"id": 1186,
"name": "balances",
"nodeType": "VariableDeclaration",
"scope": 1195,
"src": "352:41:5",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
},
"typeName": {
"id": 1185,
"keyType": {
"id": 1183,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "361:7:5",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "352:25:5",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
},
"valueType": {
"id": 1184,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "372:4:5",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 1192,
"name": "allowances",
"nodeType": "VariableDeclaration",
"scope": 1195,
"src": "399:64:5",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
"typeString": "mapping(address => mapping(address => uint256))"
},
"typeName": {
"id": 1191,
"keyType": {
"id": 1187,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "408:7:5",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "399:46:5",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
"typeString": "mapping(address => mapping(address => uint256))"
},
"valueType": {
"id": 1190,
"keyType": {
"id": 1188,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "428:7:5",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "419:25:5",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
},
"valueType": {
"id": 1189,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "439:4:5",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 1194,
"name": "totalTokens",
"nodeType": "VariableDeclaration",
"scope": 1195,
"src": "469:23:5",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1193,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "469:4:5",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "public"
}
],
"scope": 1388,
"src": "169:326:5"
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 1196,
"name": "Token",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 3360,
"src": "583:5:5",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Token_$3360",
"typeString": "contract Token"
}
},
"id": 1197,
"nodeType": "InheritanceSpecifier",
"src": "583:5:5"
},
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 1198,
"name": "StandardTokenData",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1195,
"src": "590:17:5",
"typeDescriptions": {
"typeIdentifier": "t_contract$_StandardTokenData_$1195",
"typeString": "contract StandardTokenData"
}
},
"id": 1199,
"nodeType": "InheritanceSpecifier",
"src": "590:17:5"
}
],
"contractDependencies": [
1195,
3360
],
"contractKind": "contract",
"documentation": "@title Standard token contract with overflow protection",
"fullyImplemented": true,
"id": 1387,
"linearizedBaseContracts": [
1387,
1195,
3360
],
"name": "StandardToken",
"nodeType": "ContractDefinition",
"nodes": [
{
"id": 1201,
"libraryName": {
"contractScope": null,
"id": 1200,
"name": "Math",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 4611,
"src": "620:4:5",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Math_$4611",
"typeString": "library Math"
}
},
"nodeType": "UsingForDirective",
"src": "614:17:5",
"typeName": null
},
{
"body": {
"id": 1251,
"nodeType": "Block",
"src": "971:271:5",
"statements": [
{
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 1225,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1217,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "988:38:5",
"subExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1215,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1205,
"src": "1020:5:5",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1210,
"name": "balances",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1186,
"src": "989:8:5",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 1213,
"indexExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1211,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9180,
"src": "998:3:5",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 1212,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "998:10:5",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "989:20:5",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1214,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "safeToSub",
"nodeType": "MemberAccess",
"referencedDeclaration": 4374,
"src": "989:30:5",
"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": 1216,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "989:37:5",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "||",
"rightExpression": {
"argumentTypes": null,
"id": 1224,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "1042:30:5",
"subExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 1222,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1205,
"src": "1066:5:5",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1218,
"name": "balances",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1186,
"src": "1043:8:5",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 1220,
"indexExpression": {
"argumentTypes": null,
"id": 1219,
"name": "to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1203,
"src": "1052:2:5",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1043:12:5",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1221,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "safeToAdd",
"nodeType": "MemberAccess",
"referencedDeclaration": 4360,
"src": "1043:22:5",
"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": 1223,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1043:29:5",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "988:84:5",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"falseBody": null,
"id": 1228,
"nodeType": "IfStatement",
"src": "981:117:5",
"trueBody": {
"expression": {
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 1226,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1093:5:5",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"functionReturnParameters": 1209,
"id": 1227,
"nodeType": "Return",
"src": "1086:12:5"
}
},
{
"expression": {
"argumentTypes": null,
"id": 1234,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1229,
"name": "balances",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1186,
"src": "1108:8:5",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 1232,
"indexExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1230,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9180,
"src": "1117:3:5",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 1231,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1117:10:5",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1108:20:5",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "-=",
"rightHandSide": {
"argumentTypes": null,
"id": 1233,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1205,
"src": "1132:5:5",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1108:29:5",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1235,
"nodeType": "ExpressionStatement",
"src": "1108:29:5"
},
{
"expression": {
"argumentTypes": null,
"id": 1240,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1236,
"name": "balances",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1186,
"src": "1147:8:5",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
}
},
"id": 1238,
"indexExpression": {
"argumentTypes": null,
"id": 1237,
"name": "to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1203,
"src": "1156:2:5",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1147:12:5",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "+=",
"rightHandSide": {
"argumentTypes": null,
"id": 1239,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1205,
"src": "1163:5:5",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1147:21:5",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1241,
"nodeType": "ExpressionStatement",
"src": "1147:21:5"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1243,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 9180,
"src": "1192:3:5",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 1244,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1192:10:5",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 1245,
"name": "to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1203,
"src": "1204:2:5",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"argumentTypes": null,
"id": 1246,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1205,
"src": "1208:5:5",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"id": 1242,
"name": "Transfer",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3301,
"src": "1183:8:5",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
"typeString": "function (address,address,uint256)"
}
},
"id": 1247,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1183:31:5",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1248,
"nodeType": "EmitStatement",
"src": "1178:36:5"
},
{
"expression": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 1249,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1231:4:5",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"functionReturnParameters": 1209,
"id": 1250,
"nodeType": "Return",
"src": "1224:11:5"
}
]
},
"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": 1252,
"implemented": true,
"isConstructor": false,
"isDeclaredConst": false,
"modifiers": [],
"name": "transfer",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1206,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1203,
"name": "to",
"nodeType": "VariableDeclaration",
"scope": 1252,
"src": "905:10:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1202,
"name":