@josojo/tokenized-events
Version:
tokenized events for pm markets
992 lines (991 loc) • 250 kB
JSON
{
"contractName": "StandardToken",
"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"
},
{
"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"
},
{
"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"
},
{
"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": "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": "value",
"type": "uint256"
}
],
"name": "approve",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "owner",
"type": "address"
},
{
"name": "spender",
"type": "address"
}
],
"name": "allowance",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "owner",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
}
],
"bytecode": "0x60c0604052600a60808190527f546f6b656e204e616d650000000000000000000000000000000000000000000060a090815261003e9160009190610096565b506040805180820190915260038082527f53594d0000000000000000000000000000000000000000000000000000000000602090920191825261008391600191610096565b5034801561009057600080fd5b50610131565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100d757805160ff1916838001178555610104565b82800160010185558215610104579182015b828111156101045782518255916020019190600101906100e9565b50610110929150610114565b5090565b61012e91905b80821115610110576000815560010161011a565b90565b610994806101406000396000f3006080604052600436106100b95763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100be578063095ea7b31461014857806318160ddd1461018057806323b872dd146101a757806327e235e3146101d1578063313ce567146101f257806355b6ed5c1461021d57806370a08231146102445780637e1c0c091461026557806395d89b411461027a578063a9059cbb1461028f578063dd62ed3e146102b3575b600080fd5b3480156100ca57600080fd5b506100d36102da565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561010d5781810151838201526020016100f5565b50505050905090810190601f16801561013a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561015457600080fd5b5061016c600160a060020a0360043516602435610368565b604080519115158252519081900360200190f35b34801561018c57600080fd5b506101956103cf565b60408051918252519081900360200190f35b3480156101b357600080fd5b5061016c600160a060020a03600435811690602435166044356103d5565b3480156101dd57600080fd5b50610195600160a060020a03600435166106a7565b3480156101fe57600080fd5b506102076106b9565b6040805160ff9092168252519081900360200190f35b34801561022957600080fd5b50610195600160a060020a03600435811690602435166106be565b34801561025057600080fd5b50610195600160a060020a03600435166106db565b34801561027157600080fd5b506101956106f6565b34801561028657600080fd5b506100d36106fc565b34801561029b57600080fd5b5061016c600160a060020a0360043516602435610756565b3480156102bf57600080fd5b50610195600160a060020a036004358116906024351661093d565b6000805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103605780601f1061033557610100808354040283529160200191610360565b820191906000526020600020905b81548152906001019060200180831161034357829003601f168201915b505050505081565b336000818152600360209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a35060015b92915050565b60045490565b600160a060020a03831660009081526002602090815260408083205481517fe31c71c4000000000000000000000000000000000000000000000000000000008152600481019190915260248101859052905173__Math__________________________________9263e31c71c49260448082019391829003018186803b15801561045e57600080fd5b505af4158015610472573d6000803e3d6000fd5b505050506040513d602081101561048857600080fd5b505115806105525750600160a060020a03841660009081526003602090815260408083203384528252918290205482517fe31c71c4000000000000000000000000000000000000000000000000000000008152600481019190915260248101859052915173__Math__________________________________9263e31c71c4926044808301939192829003018186803b15801561052457600080fd5b505af4158015610538573d6000803e3d6000fd5b505050506040513d602081101561054e57600080fd5b5051155b806106115750600160a060020a0383166000908152600260209081526040918290205482517f4e30a66c000000000000000000000000000000000000000000000000000000008152600481019190915260248101859052915173__Math__________________________________92634e30a66c926044808301939192829003018186803b1580156105e357600080fd5b505af41580156105f7573d6000803e3d6000fd5b505050506040513d602081101561060d57600080fd5b5051155b1561061e575060006106a0565b600160a060020a0380851660008181526002602081815260408084208054899003905560038252808420338552825280842080548990039055948816808452918152918490208054870190558351868152935190937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92908290030190a35060015b9392505050565b60026020526000908152604090205481565b601281565b600360209081526000928352604080842090915290825290205481565b600160a060020a031660009081526002602052604090205490565b60045481565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103605780601f1061033557610100808354040283529160200191610360565b3360009081526002602090815260408083205481517fe31c71c4000000000000000000000000000000000000000000000000000000008152600481019190915260248101859052905173__Math__________________________________9263e31c71c49260448082019391829003018186803b1580156107d657600080fd5b505af41580156107ea573d6000803e3d6000fd5b505050506040513d602081101561080057600080fd5b505115806108c25750600160a060020a0383166000908152600260209081526040918290205482517f4e30a66c000000000000000000000000000000000000000000000000000000008152600481019190915260248101859052915173__Math__________________________________92634e30a66c926044808301939192829003018186803b15801561089457600080fd5b505af41580156108a8573d6000803e3d6000fd5b505050506040513d60208110156108be57600080fd5b5051155b156108cf575060006103c9565b33600081815260026020908152604080832080548790039055600160a060020a03871680845292819020805487019055805186815290519293927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a350600192915050565b600160a060020a039182166000908152600360209081526040808320939094168252919091522054905600a165627a7a72305820cb0da26092d9c0879543f2a9426987de4ed55d5715f2172d02d94bc9e0ad72d50029",
"deployedBytecode": "0x6080604052600436106100b95763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100be578063095ea7b31461014857806318160ddd1461018057806323b872dd146101a757806327e235e3146101d1578063313ce567146101f257806355b6ed5c1461021d57806370a08231146102445780637e1c0c091461026557806395d89b411461027a578063a9059cbb1461028f578063dd62ed3e146102b3575b600080fd5b3480156100ca57600080fd5b506100d36102da565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561010d5781810151838201526020016100f5565b50505050905090810190601f16801561013a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561015457600080fd5b5061016c600160a060020a0360043516602435610368565b604080519115158252519081900360200190f35b34801561018c57600080fd5b506101956103cf565b60408051918252519081900360200190f35b3480156101b357600080fd5b5061016c600160a060020a03600435811690602435166044356103d5565b3480156101dd57600080fd5b50610195600160a060020a03600435166106a7565b3480156101fe57600080fd5b506102076106b9565b6040805160ff9092168252519081900360200190f35b34801561022957600080fd5b50610195600160a060020a03600435811690602435166106be565b34801561025057600080fd5b50610195600160a060020a03600435166106db565b34801561027157600080fd5b506101956106f6565b34801561028657600080fd5b506100d36106fc565b34801561029b57600080fd5b5061016c600160a060020a0360043516602435610756565b3480156102bf57600080fd5b50610195600160a060020a036004358116906024351661093d565b6000805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103605780601f1061033557610100808354040283529160200191610360565b820191906000526020600020905b81548152906001019060200180831161034357829003601f168201915b505050505081565b336000818152600360209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a35060015b92915050565b60045490565b600160a060020a03831660009081526002602090815260408083205481517fe31c71c4000000000000000000000000000000000000000000000000000000008152600481019190915260248101859052905173__Math__________________________________9263e31c71c49260448082019391829003018186803b15801561045e57600080fd5b505af4158015610472573d6000803e3d6000fd5b505050506040513d602081101561048857600080fd5b505115806105525750600160a060020a03841660009081526003602090815260408083203384528252918290205482517fe31c71c4000000000000000000000000000000000000000000000000000000008152600481019190915260248101859052915173__Math__________________________________9263e31c71c4926044808301939192829003018186803b15801561052457600080fd5b505af4158015610538573d6000803e3d6000fd5b505050506040513d602081101561054e57600080fd5b5051155b806106115750600160a060020a0383166000908152600260209081526040918290205482517f4e30a66c000000000000000000000000000000000000000000000000000000008152600481019190915260248101859052915173__Math__________________________________92634e30a66c926044808301939192829003018186803b1580156105e357600080fd5b505af41580156105f7573d6000803e3d6000fd5b505050506040513d602081101561060d57600080fd5b5051155b1561061e575060006106a0565b600160a060020a0380851660008181526002602081815260408084208054899003905560038252808420338552825280842080548990039055948816808452918152918490208054870190558351868152935190937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92908290030190a35060015b9392505050565b60026020526000908152604090205481565b601281565b600360209081526000928352604080842090915290825290205481565b600160a060020a031660009081526002602052604090205490565b60045481565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103605780601f1061033557610100808354040283529160200191610360565b3360009081526002602090815260408083205481517fe31c71c4000000000000000000000000000000000000000000000000000000008152600481019190915260248101859052905173__Math__________________________________9263e31c71c49260448082019391829003018186803b1580156107d657600080fd5b505af41580156107ea573d6000803e3d6000fd5b505050506040513d602081101561080057600080fd5b505115806108c25750600160a060020a0383166000908152600260209081526040918290205482517f4e30a66c000000000000000000000000000000000000000000000000000000008152600481019190915260248101859052915173__Math__________________________________92634e30a66c926044808301939192829003018186803b15801561089457600080fd5b505af41580156108a8573d6000803e3d6000fd5b505050506040513d60208110156108be57600080fd5b5051155b156108cf575060006103c9565b33600081815260026020908152604080832080548790039055600160a060020a03871680845292819020805487019055805186815290519293927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a350600192915050565b600160a060020a039182166000908152600360209081526040808320939094168252919091522054905600a165627a7a72305820cb0da26092d9c0879543f2a9426987de4ed55d5715f2172d02d94bc9e0ad72d50029",
"sourceMap": "234:34:9:-;557:2726;234:34;;557:2726;234:34;;;;;;;;;;-1:-1:-1;;234:34:9;;:::i;:::-;-1:-1:-1;274:28:9;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;557:2726;8:9:-1;5:2;;;30:1;27;20:12;5:2;557:2726:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;557:2726:9;;;-1:-1:-1;557:2726:9;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;",
"deployedSourceMap": "557:2726: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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2235:216;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2235:216:9;-1:-1:-1;;;;;2235:216:9;;;;;;;;;;;;;;;;;;;;;;;;;3168:113;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3168:113:9;;;;;;;;;;;;;;;;;;;;1554:464;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1554:464:9;-1:-1:-1;;;;;1554:464:9;;;;;;;;;;;;352:41;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;352:41:9;-1:-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;-1:-1:-1;;;;;399:64:9;;;;;;;;;;2961:128;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2961:128:9;-1:-1:-1;;;;;2961:128: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;;;;887:355;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;887:355:9;-1:-1:-1;;;;;887:355:9;;;;;;;2661:156;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2661:156:9;-1:-1:-1;;;;;2661:156:9;;;;;;;;;;234:34;;;;;;;;;;;;;;;-1:-1:-1;;234:34:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;2235:216::-;2344:10;2313:4;2333:22;;;:10;:22;;;;;;;;-1:-1:-1;;;;;2333:31:9;;;;;;;;;;;:39;;;2387:36;;;;;;;2313:4;;2333:31;;2344:10;;2387:36;;;;;;;;-1:-1:-1;2440:4:9;2235:216;;;;;:::o;3168:113::-;3263:11;;3168:113;:::o;1554:464::-;-1:-1:-1;;;;;1674:14:9;;1646:4;1674:14;;;:8;:14;;;;;;;;;:31;;;;;;;;;;;;;;;;;;;;:24;;;;:31;;;;;;;;;;;:24;:31;;;5:2:-1;;;;30:1;27;20:12;5:2;1674:31:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1674:31:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1674:31:9;1673:32;;:94;;-1:-1:-1;;;;;;1722:16:9;;;;;;:10;:16;;;;;;;;1739:10;1722:28;;;;;;;;;:45;;;;;;;;;;;;;;;;;;;;:38;;;;:45;;;;;:16;;:45;;;;;:38;:45;;;5:2:-1;;;;30:1;27;20:12;5:2;1722:45:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1722:45:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1722:45:9;1721:46;1673:94;:140;;;-1:-1:-1;;;;;;1784:12:9;;;;;;:8;:12;;;;;;;;;;:29;;;;;;;;;;;;;;;;;;;;:22;;;;:29;;;;;:12;;:29;;;;;:22;:29;;;5:2:-1;;;;30:1;27;20:12;5:2;1784:29:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1784:29:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1784:29:9;1783:30;1673:140;1666:173;;;-1:-1:-1;1834:5:9;1827:12;;1666:173;-1:-1:-1;;;;;1849:14:9;;;;;;;:8;:14;;;;;;;;:23;;;;;;;1882:10;:16;;;;;1899:10;1882:28;;;;;;;:37;;;;;;;1929:12;;;;;;;;;;;;;:21;;;;;;1965:25;;;;;;;1929:12;;1965:25;;;;;;;;;-1:-1:-1;2007:4:9;1554:464;;;;;;:::o;352:41::-;;;;;;;;;;;;;:::o;308:35::-;341:2;308:35;:::o;399:64::-;;;;;;;;;;;;;;;;;;;;;;;;:::o;2961:128::-;-1:-1:-1;;;;;3067:15:9;3040:4;3067:15;;;:8;:15;;;;;;;2961:128::o;469:23::-;;;;:::o;274:28::-;;;;;;;;;;;;;;;-1:-1:-1;;274:28:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;887:355;998:10;961:4;989:20;;;:8;:20;;;;;;;;;:37;;;;;;;;;;;;;;;;;;;;:30;;;;:37;;;;;;;;;;;:30;:37;;;5:2:-1;;;;30:1;27;20:12;5:2;989:37:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;989:37:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;989:37:9;988:38;;:84;;-1:-1:-1;;;;;;1043:12:9;;;;;;:8;:12;;;;;;;;;;:29;;;;;;;;;;;;;;;;;;;;:22;;;;:29;;;;;:12;;:29;;;;;:22;:29;;;5:2:-1;;;;30:1;27;20:12;5:2;1043:29:9;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1043:29:9;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1043:29:9;1042:30;988:84;981:117;;;-1:-1:-1;1093:5:9;1086:12;;981:117;1117:10;1108:20;;;;:8;:20;;;;;;;;:29;;;;;;;-1:-1:-1;;;;;1147:12:9;;;;;;;;;:21;;;;;;1183:31;;;;;;;1147:12;;1117:10;1183:31;;;;;;;;;;;-1:-1:-1;1231:4:9;887:355;;;;:::o;2661:156::-;-1:-1:-1;;;;;2784:17:9;;;2757:4;2784:17;;;:10;:17;;;;;;;;:26;;;;;;;;;;;;;2661:156::o",
"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,