UNPKG

@josojo/tokenized-events

Version:
879 lines 343 kB
{ "contractName": "Event", "abi": [ { "constant": true, "inputs": [], "name": "outcome", "outputs": [ { "name": "", "type": "bytes32" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "content_hash", "outputs": [ { "name": "", "type": "bytes32" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "collateralBranch", "outputs": [ { "name": "", "type": "bytes32" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "minTimeout", "outputs": [ { "name": "", "type": "uint32" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "minBond", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "name": "", "type": "uint256" } ], "name": "outcomeTokens", "outputs": [ { "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "forkonomicToken", "outputs": [ { "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "masterCopy", "outputs": [ { "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "questionId", "outputs": [ { "name": "", "type": "bytes32" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "openingTs", "outputs": [ { "name": "", "type": "uint32" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "fSystem", "outputs": [ { "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "anonymous": false, "inputs": [ { "indexed": false, "name": "outcomeToken", "type": "address" }, { "indexed": false, "name": "index", "type": "uint8" } ], "name": "OutcomeTokenCreation", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "buyer", "type": "address" }, { "indexed": false, "name": "collateralTokenCount", "type": "uint256" } ], "name": "OutcomeTokenSetIssuance", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "seller", "type": "address" }, { "indexed": false, "name": "outcomeTokenCount", "type": "uint256" } ], "name": "OutcomeTokenSetRevocation", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "receiver", "type": "address" }, { "indexed": false, "name": "winnings", "type": "uint256" }, { "indexed": false, "name": "branch", "type": "bytes32" } ], "name": "WinningsRedemption", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "name": "a", "type": "bytes32" } ], "name": "LogB", "type": "event" }, { "constant": false, "inputs": [ { "name": "collateralTokenCount", "type": "uint256" } ], "name": "buyAllOutcomes", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "outcomeTokenCount", "type": "uint256" } ], "name": "sellAllOutcomes", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [ { "name": "branch", "type": "bytes32" }, { "name": "arbitrator", "type": "address" } ], "name": "getOutcome", "outputs": [ { "name": "outcome", "type": "int256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "getOutcomeCount", "outputs": [ { "name": "", "type": "uint8" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "getOutcomeTokens", "outputs": [ { "name": "", "type": "address[]" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "name": "owner", "type": "address" } ], "name": "getOutcomeTokenDistribution", "outputs": [ { "name": "outcomeTokenDistribution", "type": "uint256[]" } ], "payable": false, "stateMutability": "view", "type": "function" } ], "bytecode": "0x60806040526101f46007556008805463ffffffff19166201518017905534801561002857600080fd5b50610e2c806100386000396000f3006080604052600436106100f05763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166327793f8781146100f5578063280472581461011c57806328da850b14610131578063413d24b91461014b5780634cf71be41461016057806369c19d4c1461018e5780636fb1edcd146101ff5780637dc8f08614610217578063831518b7146102425780638abe59ea14610257578063942032e31461028b578063a619486e146102a0578063b06a5c52146102b5578063c7049657146102ca578063d440796e146102df578063d71ed40a146102f4578063f21a146814610318575b600080fd5b34801561010157600080fd5b5061010a61032d565b60408051918252519081900360200190f35b34801561012857600080fd5b5061010a610333565b34801561013d57600080fd5b50610149600435610339565b005b34801561015757600080fd5b5061010a610528565b34801561016c57600080fd5b5061017561052e565b6040805163ffffffff9092168252519081900360200190f35b34801561019a57600080fd5b506101af600160a060020a036004351661053a565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156101eb5781810151838201526020016101d3565b505050509050019250505060405180910390f35b34801561020b57600080fd5b50610149600435610659565b34801561022357600080fd5b5061022c610842565b6040805160ff9092168252519081900360200190f35b34801561024e57600080fd5b5061010a610848565b34801561026357600080fd5b5061026f60043561084e565b60408051600160a060020a039092168252519081900360200190f35b34801561029757600080fd5b5061026f610876565b3480156102ac57600080fd5b5061026f610885565b3480156102c157600080fd5b5061010a610894565b3480156102d657600080fd5b5061017561089a565b3480156102eb57600080fd5b5061026f6108ae565b34801561030057600080fd5b5061010a600435600160a060020a03602435166108bd565b34801561032457600080fd5b506101af610d9e565b60095481565b60065481565b60025460048054604080517f401e3367000000000000000000000000000000000000000000000000000000008152339381019390935230602484015260448301859052606483019190915251600092600160a060020a03169163401e336791608480830192602092919082900301818787803b1580156103b857600080fd5b505af11580156103cc573d6000803e3d6000fd5b505050506040513d60208110156103e257600080fd5b5051151561043a576040805160e560020a62461bcd02815260206004820152601960248201527f7472616e7366657220776173206e6f7420706f737369626c6500000000000000604482015290519081900360640190fd5b5060005b60015460ff821610156104ee576001805460ff831690811061045c57fe5b6000918252602082200154604080517f867904b4000000000000000000000000000000000000000000000000000000008152336004820152602481018690529051600160a060020a039092169263867904b49260448084019382900301818387803b1580156104ca57600080fd5b505af11580156104de573d6000803e3d6000fd5b50506001909201915061043e9050565b60408051838152905133917fad2a02292986148558019ae4abf172732228e32e131a91d3fa7e0cada61932c0919081900360200190a25050565b60045481565b60085463ffffffff1681565b6060600060018054905060405190808252806020026020018201604052801561056d578160200160208202803883390190505b509150600090505b81518160ff161015610653576001805460ff831690811061059257fe5b6000918252602080832090910154604080517f70a08231000000000000000000000000000000000000000000000000000000008152600160a060020a038881166004830152915191909216936370a0823193602480850194919392918390030190829087803b15801561060457600080fd5b505af1158015610618573d6000803e3d6000fd5b505050506040513d602081101561062e57600080fd5b50518251839060ff841690811061064157fe5b60209081029091010152600101610575565b50919050565b60005b60015460ff8216101561070c576001805460ff831690811061067a57fe5b6000918252602082200154604080517feac449d9000000000000000000000000000000000000000000000000000000008152336004820152602481018690529051600160a060020a039092169263eac449d99260448084019382900301818387803b1580156106e857600080fd5b505af11580156106fc573d6000803e3d6000fd5b50506001909201915061065c9050565b60025460048054604080517f57cfeeee000000000000000000000000000000000000000000000000000000008152339381019390935260248301869052604483019190915251600160a060020a03909216916357cfeeee916064808201926020929091908290030181600087803b15801561078657600080fd5b505af115801561079a573d6000803e3d6000fd5b505050506040513d60208110156107b057600080fd5b50511515610808576040805160e560020a62461bcd02815260206004820152600f60248201527f7472616e73666572206661696c65640000000000000000000000000000000000604482015290519081900360640190fd5b60408051838152905133917f7ac9271efd660c24459c447459e46f7366d2b4a692e572f108619d0d7273fcc5919081900360200190a25050565b60015490565b60075481565b600180548290811061085c57fe5b600091825260209091200154600160a060020a0316905081565b600254600160a060020a031681565b600054600160a060020a031681565b60055481565b600854640100000000900463ffffffff1681565b600354600160a060020a031681565b60035460048054604080517f406edd36000000000000000000000000000000000000000000000000000000008152928301919091526024820185905251600092600160a060020a03169163406edd3691604480830192602092919082900301818787803b15801561092d57600080fd5b505af1158015610941573d6000803e3d6000fd5b505050506040513d602081101561095757600080fd5b505115156109af576040805160e560020a62461bcd02815260206004820152601460248201527f206e6f74206120666168746572206272616e6368000000000000000000000000604482015290519081900360640190fd5b600354604080517f49469146000000000000000000000000000000000000000000000000000000008152600160a060020a038581166004830152602482018790529151919092169163494691469160448083019260209291908290030181600087803b158015610a1e57600080fd5b505af1158015610a32573d6000803e3d6000fd5b505050506040513d6020811015610a4857600080fd5b50511515610aa0576040805160e560020a62461bcd02815260206004820152601b60248201527f61726269747261746f72206e6f742077686974652d6c69737465640000000000604482015290519081900360640190fd5b600360009054906101000a9004600160a060020a0316600160a060020a031663530230716040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610b0c57600080fd5b505af1158015610b20573d6000803e3d6000fd5b505050506040513d6020811015610b3657600080fd5b5051600854600554604080517facae8f4e00000000000000000000000000000000000000000000000000000000815260048101929092525168010000000000000000909204600160a060020a03169163acae8f4e916024808201926020929091908290030181600087803b158015610bad57600080fd5b505af1158015610bc1573d6000803e3d6000fd5b505050506040513d6020811015610bd757600080fd5b5051600354604080517f0236b8170000000000000000000000000000000000000000000000000000000081526004810188905290519390920363ffffffff1692600160a060020a0390911691630236b8179160248083019260209291908290030181600087803b158015610c4a57600080fd5b505af1158015610c5e573d6000803e3d6000fd5b505050506040513d6020811015610c7457600080fd5b505111610ccb576040805160e560020a62461bcd02815260206004820152601060248201527f6272616e636820697320746f206f6c6400000000000000000000000000000000604482015290519081900360640190fd5b600854600554600654600754604080517f12a203c300000000000000000000000000000000000000000000000000000000815260048101949094526024840192909252600160a060020a03868116604485015263ffffffff85166064850152608484019190915290516801000000000000000090930416916312a203c39160a4808201926020929091908290030181600087803b158015610d6b57600080fd5b505af1158015610d7f573d6000803e3d6000fd5b505050506040513d6020811015610d9557600080fd5b50519392505050565b60606001805480602002602001604051908101604052809291908181526020018280548015610df657602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311610dd8575b50505050509050905600a165627a7a72305820d9035d8569a7abe4906077e210cddff3d731e4e4c6492e1d39579411095489d10029", "deployedBytecode": "0x6080604052600436106100f05763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166327793f8781146100f5578063280472581461011c57806328da850b14610131578063413d24b91461014b5780634cf71be41461016057806369c19d4c1461018e5780636fb1edcd146101ff5780637dc8f08614610217578063831518b7146102425780638abe59ea14610257578063942032e31461028b578063a619486e146102a0578063b06a5c52146102b5578063c7049657146102ca578063d440796e146102df578063d71ed40a146102f4578063f21a146814610318575b600080fd5b34801561010157600080fd5b5061010a61032d565b60408051918252519081900360200190f35b34801561012857600080fd5b5061010a610333565b34801561013d57600080fd5b50610149600435610339565b005b34801561015757600080fd5b5061010a610528565b34801561016c57600080fd5b5061017561052e565b6040805163ffffffff9092168252519081900360200190f35b34801561019a57600080fd5b506101af600160a060020a036004351661053a565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156101eb5781810151838201526020016101d3565b505050509050019250505060405180910390f35b34801561020b57600080fd5b50610149600435610659565b34801561022357600080fd5b5061022c610842565b6040805160ff9092168252519081900360200190f35b34801561024e57600080fd5b5061010a610848565b34801561026357600080fd5b5061026f60043561084e565b60408051600160a060020a039092168252519081900360200190f35b34801561029757600080fd5b5061026f610876565b3480156102ac57600080fd5b5061026f610885565b3480156102c157600080fd5b5061010a610894565b3480156102d657600080fd5b5061017561089a565b3480156102eb57600080fd5b5061026f6108ae565b34801561030057600080fd5b5061010a600435600160a060020a03602435166108bd565b34801561032457600080fd5b506101af610d9e565b60095481565b60065481565b60025460048054604080517f401e3367000000000000000000000000000000000000000000000000000000008152339381019390935230602484015260448301859052606483019190915251600092600160a060020a03169163401e336791608480830192602092919082900301818787803b1580156103b857600080fd5b505af11580156103cc573d6000803e3d6000fd5b505050506040513d60208110156103e257600080fd5b5051151561043a576040805160e560020a62461bcd02815260206004820152601960248201527f7472616e7366657220776173206e6f7420706f737369626c6500000000000000604482015290519081900360640190fd5b5060005b60015460ff821610156104ee576001805460ff831690811061045c57fe5b6000918252602082200154604080517f867904b4000000000000000000000000000000000000000000000000000000008152336004820152602481018690529051600160a060020a039092169263867904b49260448084019382900301818387803b1580156104ca57600080fd5b505af11580156104de573d6000803e3d6000fd5b50506001909201915061043e9050565b60408051838152905133917fad2a02292986148558019ae4abf172732228e32e131a91d3fa7e0cada61932c0919081900360200190a25050565b60045481565b60085463ffffffff1681565b6060600060018054905060405190808252806020026020018201604052801561056d578160200160208202803883390190505b509150600090505b81518160ff161015610653576001805460ff831690811061059257fe5b6000918252602080832090910154604080517f70a08231000000000000000000000000000000000000000000000000000000008152600160a060020a038881166004830152915191909216936370a0823193602480850194919392918390030190829087803b15801561060457600080fd5b505af1158015610618573d6000803e3d6000fd5b505050506040513d602081101561062e57600080fd5b50518251839060ff841690811061064157fe5b60209081029091010152600101610575565b50919050565b60005b60015460ff8216101561070c576001805460ff831690811061067a57fe5b6000918252602082200154604080517feac449d9000000000000000000000000000000000000000000000000000000008152336004820152602481018690529051600160a060020a039092169263eac449d99260448084019382900301818387803b1580156106e857600080fd5b505af11580156106fc573d6000803e3d6000fd5b50506001909201915061065c9050565b60025460048054604080517f57cfeeee000000000000000000000000000000000000000000000000000000008152339381019390935260248301869052604483019190915251600160a060020a03909216916357cfeeee916064808201926020929091908290030181600087803b15801561078657600080fd5b505af115801561079a573d6000803e3d6000fd5b505050506040513d60208110156107b057600080fd5b50511515610808576040805160e560020a62461bcd02815260206004820152600f60248201527f7472616e73666572206661696c65640000000000000000000000000000000000604482015290519081900360640190fd5b60408051838152905133917f7ac9271efd660c24459c447459e46f7366d2b4a692e572f108619d0d7273fcc5919081900360200190a25050565b60015490565b60075481565b600180548290811061085c57fe5b600091825260209091200154600160a060020a0316905081565b600254600160a060020a031681565b600054600160a060020a031681565b60055481565b600854640100000000900463ffffffff1681565b600354600160a060020a031681565b60035460048054604080517f406edd36000000000000000000000000000000000000000000000000000000008152928301919091526024820185905251600092600160a060020a03169163406edd3691604480830192602092919082900301818787803b15801561092d57600080fd5b505af1158015610941573d6000803e3d6000fd5b505050506040513d602081101561095757600080fd5b505115156109af576040805160e560020a62461bcd02815260206004820152601460248201527f206e6f74206120666168746572206272616e6368000000000000000000000000604482015290519081900360640190fd5b600354604080517f49469146000000000000000000000000000000000000000000000000000000008152600160a060020a038581166004830152602482018790529151919092169163494691469160448083019260209291908290030181600087803b158015610a1e57600080fd5b505af1158015610a32573d6000803e3d6000fd5b505050506040513d6020811015610a4857600080fd5b50511515610aa0576040805160e560020a62461bcd02815260206004820152601b60248201527f61726269747261746f72206e6f742077686974652d6c69737465640000000000604482015290519081900360640190fd5b600360009054906101000a9004600160a060020a0316600160a060020a031663530230716040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610b0c57600080fd5b505af1158015610b20573d6000803e3d6000fd5b505050506040513d6020811015610b3657600080fd5b5051600854600554604080517facae8f4e00000000000000000000000000000000000000000000000000000000815260048101929092525168010000000000000000909204600160a060020a03169163acae8f4e916024808201926020929091908290030181600087803b158015610bad57600080fd5b505af1158015610bc1573d6000803e3d6000fd5b505050506040513d6020811015610bd757600080fd5b5051600354604080517f0236b8170000000000000000000000000000000000000000000000000000000081526004810188905290519390920363ffffffff1692600160a060020a0390911691630236b8179160248083019260209291908290030181600087803b158015610c4a57600080fd5b505af1158015610c5e573d6000803e3d6000fd5b505050506040513d6020811015610c7457600080fd5b505111610ccb576040805160e560020a62461bcd02815260206004820152601060248201527f6272616e636820697320746f206f6c6400000000000000000000000000000000604482015290519081900360640190fd5b600854600554600654600754604080517f12a203c300000000000000000000000000000000000000000000000000000000815260048101949094526024840192909252600160a060020a03868116604485015263ffffffff85166064850152608484019190915290516801000000000000000090930416916312a203c39160a4808201926020929091908290030181600087803b158015610d6b57600080fd5b505af1158015610d7f573d6000803e3d6000fd5b505050506040513d6020811015610d9557600080fd5b50519392505050565b60606001805480602002602001604051908101604052809291908181526020018280548015610df657602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311610dd8575b50505050509050905600a165627a7a72305820d9035d8569a7abe4906077e210cddff3d731e4e4c6492e1d39579411095489d10029", "sourceMap": "1196:3165:0:-;;;972:3;947:28;;981:35;;;-1:-1:-1;;981:35:0;1008:8;981:35;;;1196:3165;5:2:-1;;;;30:1;27;20:12;5:2;1196:3165:0;;;;;;;", "deployedSourceMap": "1196:3165:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1078:22;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1078:22:0;;;;;;;;;;;;;;;;;;;;914:27;;8:9:-1;5:2;;;30:1;27;20:12;5:2;914:27:0;;;;1462:513;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1462:513:0;;;;;;;846:31;;8:9:-1;5:2;;;30:1;27;20:12;5:2;846:31:0;;;;981:35;;8:9:-1;5:2;;;30:1;27;20:12;5:2;981:35:0;;;;;;;;;;;;;;;;;;;;;;;4003:355;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;4003:355:0;-1:-1:-1;;;;;4003:355:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;4003:355:0;;;;;;;;;;;;;;;;;2158:492;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2158:492:0;;;;;3547:134;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3547:134:0;;;;;;;;;;;;;;;;;;;;;;;947:28;;8:9:-1;5:2;;;30:1;27;20:12;5:2;947:28:0;;;;722:35;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;722:35:0;;;;;;;;;-1:-1:-1;;;;;722:35:0;;;;;;;;;;;;;;765:38;;8:9:-1;5:2;;;30:1;27;20:12;5:2;765:38:0;;;;197:25:7;;8:9:-1;5:2;;;30:1;27;20:12;5:2;197:25:7;;;;883::0;;8:9:-1;5:2;;;30:1;27;20:12;5:2;883:25:0;;;;1022:23;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1022:23:0;;;;809:31;;8:9:-1;5:2;;;30:1;27;20:12;5:2;809:31:0;;;;2775:701;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2775:701:0;;;-1:-1:-1;;;;;2775:701:0;;;;;3760:130;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3760:130:0;;;;1078:22;;;;:::o;914:27::-;;;;:::o;1462:513::-;1607:15;;1676:16;;;1607:86;;;;;;1636:10;1607:86;;;;;;;1648:4;1607:86;;;;;;;;;;;;;;;;;;1784:7;;-1:-1:-1;;;;;1607:15:0;;:28;;:86;;;;;;;;;;;;;;1784:7;1607:15;:86;;;5:2:-1;;;;30:1;27;20:12;5:2;1607:86:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1607:86:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1607:86:0;1599:124;;;;;;;-1:-1:-1;;;;;1599:124:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1794:1:0;1779:117;1801:13;:20;1797:24;;;;1779:117;;;1840:13;:16;;;;;;;;;;;;;;;;;;;;;:56;;;;;;1863:10;1840:56;;;;;;;;;;;;-1:-1:-1;;;;;1840:16:0;;;;:22;;:56;;;;;;;;;;:16;;:56;;;5:2:-1;;;;30:1;27;20:12;5:2;1840:56:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;1823:3:0;;;;;-1:-1:-1;1779:117:0;;-1:-1:-1;1779:117:0;;1911:57;;;;;;;;1935:10;;1911:57;;;;;;;;;;1462:513;;:::o;846:31::-;;;;:::o;981:35::-;;;;;;:::o;4003:355::-;4100:31;4221:7;4185:13;:20;;;;4174:32;;;;;;;;;;;;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;136:17;;-1:-1;4174:32:0;;4147:59;;4231:1;4221:11;;4216:135;4238:24;:31;4234:1;:35;;;4216:135;;;4318:13;:16;;;;;;;;;;;;;;;;;;;;;;;;:33;;;;;;-1:-1:-1;;;;;4318:33:0;;;;;;;;;:16;;;;;:26;;:33;;;;;:16;;:33;;;;;;;;;:16;:33;;;5:2:-1;;;;30:1;27;20:12;5:2;4318:33:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4318:33:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4318:33:0;4288:27;;:24;;:27;;;;;;;;;;;;;;;;;;:63;4271:3;;4216:135;;;4003:355;;;;:::o;2158:492::-;2303:7;2298:115;2320:13;:20;2316:24;;;;2298:115;;;2359:13;:16;;;;;;;;;;;;;;;;;;;;;:54;;;;;;2383:10;2359:54;;;;;;;;;;;;-1:-1:-1;;;;;2359:16:0;;;;:23;;:54;;;;;;;;;;:16;;:54;;;5:2:-1;;;;30:1;27;20:12;5:2;2359:54:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;2342:3:0;;;;;-1:-1:-1;2298:115:0;;-1:-1:-1;2298:115:0;;2479:15;;2535:16;;;2479:73;;;;;;2504:10;2479:73;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2479:15:0;;;;:24;;:73;;;;;;;;;;;;;;;:15;;:73;;;5:2:-1;;;;30:1;27;20:12;5:2;2479:73:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2479:73:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2479:73:0;2471:101;;;;;;;-1:-1:-1;;;;;2471:101:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;2587:56;;;;;;;;2613:10;;2587:56;;;;;;;;;;2158:492;;:::o;3547:134::-;3653:13;:20;3547:134;:::o;947:28::-;;;;:::o;722:35::-;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;722:35:0;;-1:-1:-1;722:35:0;:::o;765:38::-;;;-1:-1:-1;;;;;765:38:0;;:::o;197:25:7:-;;;-1:-1:-1;;;;;197:25:7;;:::o;883::0:-;;;;:::o;1022:23::-;;;;;;;;;:::o;809:31::-;;;-1:-1:-1;;;;;809:31:0;;:::o;2775:701::-;2982:7;;3007:16;;;2982:50;;;;;;;;;;;;;;;;;;;;2876:11;;-1:-1:-1;;;;;2982:7:0;;:24;;:50;;;;;;;;;;;;;;2876:11;2982:7;:50;;;5:2:-1;;;;30:1;27;20:12;5:2;2982:50:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2982:50:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2982:50:0;2974:83;;;;;;;-1:-1:-1;;;;;2974:83:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;3127:7;;:51;;;;;;-1:-1:-1;;;;;3127:51:0;;;;;;;;;;;;;;;:7;;;;;:31;;:51;;;;;;;;;;;;;;:7;;:51;;;5:2:-1;;;;30:1;27;20:12;5:2;3127:51:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3127:51:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3127:51:0;3119:91;;;;;;;-1:-1:-1;;;;;3119:91:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;3304:7;;;;;;;;;-1:-1:-1;;;;;3304:7:0;-1:-1:-1;;;;;3304:22:0;;:24;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3304:24:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3304:24:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3304:24:0;3263:12;;3290:10;;3263:38;;;;;;;;;;;;;;:12;;;;-1:-1:-1;;;;;3263:12:0;;:26;;:38;;;;;3304:24;;3263:38;;;;;;;;-1:-1:-1;3263:12:0;:38;;;5:2:-1;;;;30:1;27;20:12;5:2;3263:38:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3263:38:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3263:38:0;3229:7;;:31;;;;;;;;;;;;;;3263:65;;;;3229:99;;;-1:-1:-1;;;;;3229:7:0;;;;:23;;:31;;;;;3263:38;;3229:31;;;;;;;-1:-1:-1;3229:7:0;:31;;;5:2:-1;;;;30:1;27;20:12;5:2;3229:31:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3229:31:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3229:31:0;:99;3221:128;;;;;-1:-1:-1;;;;;3221:128:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;3373:12;;3410:10;;3422:12;;3460:7;;3373:95;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3373:95:0;;;;;;;3448:10;;;3373:95;;;;;;;;;;;;;:12;;;;;;:36;;:95;;;;;;;;;;;;;;;3448:10;3373:12;:95;;;5:2:-1;;;;30:1;27;20:12;5:2;3373:95:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3373:95:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3373:95:0;;2775:701;-1:-1:-1;;;2775:701:0:o;3760:130::-;3833:14;3870:13;3863:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3863:20:0;;;;;;;;;;;;;;;;;;;;;;;3760:130;:::o", "source": "pragma solidity ^0.4.24;\nimport \"@gnosis.pm/pm-contracts/contracts/Tokens/Token.sol\";\nimport \"./OutcomeToken.sol\";\nimport \"./Proxy.sol\";\nimport \"@josojo/forkonomics-contracts/contracts/ForkonomicToken.sol\";\nimport \"@realitio/realitio-contracts/truffle/contracts/Realitio.sol\";\n\n\ncontract EventData {\n\n /*\n * Events\n */\n event OutcomeTokenCreation(OutcomeToken outcomeToken, uint8 index);\n event OutcomeTokenSetIssuance(address indexed buyer, uint collateralTokenCount);\n event OutcomeTokenSetRevocation(address indexed seller, uint outcomeTokenCount);\n event WinningsRedemption(address indexed receiver, uint winnings, bytes32 branch);\n event LogB(bytes32 a);\n /*\n * Storage\n */\n OutcomeToken[] public outcomeTokens;\n\n\n ForkonomicToken public forkonomicToken;\n ForkonomicSystem public fSystem;\n bytes32 public collateralBranch;\n bytes32 public questionId;\n bytes32 public content_hash;\n uint256 public minBond = 500;\n uint32 public minTimeout = 60*60*24;\n uint32 public openingTs;\n Realitio realityCheck;\n bytes32 public outcome;\n\n}\n\n/// @title Event contract - Provide basic functionality required by different event types\ncontract Event is Proxied, EventData {\n\n /*\n * Public functions\n */\n /// @dev Buys equal number of tokens of all outcomes, exchanging collateral tokens and sets of outcome tokens 1:1\n /// @param collateralTokenCount Number of collateral tokens\n function buyAllOutcomes(uint collateralTokenCount)\n public\n {\n // Transfer collateral tokens to events contract\n require(forkonomicToken.transferFrom(msg.sender, this, collateralTokenCount, collateralBranch), \"transfer was not possible\");\n // Issue new outcome tokens to sender\n for (uint8 i = 0; i < outcomeTokens.length; i++)\n outcomeTokens[i].issue(msg.sender, collateralTokenCount);\n emit OutcomeTokenSetIssuance(msg.sender, collateralTokenCount);\n }\n\n /// @dev Sells equal number of tokens of all outcomes, exchanging collateral tokens and sets of outcome tokens 1:1\n /// @param outcomeTokenCount Number of outcome tokens\n function sellAllOutcomes(uint outcomeTokenCount)\n public\n { \n // Revoke sender's outcome tokens of all outcomes\n for (uint8 i = 0; i < outcomeTokens.length; i++)\n outcomeTokens[i].revoke(msg.sender, outcomeTokenCount);\n // Transfer collateral tokens to sender\n require(forkonomicToken.transfer(msg.sender, outcomeTokenCount, collateralBranch), \"transfer failed\");\n emit OutcomeTokenSetRevocation(msg.sender, outcomeTokenCount);\n }\n\n \n /// @dev gets winning event outcome\n /// @param branch is the branch on which a user wants to know the result\n function getOutcome(bytes32 branch, address arbitrator)\n public\n view\n returns (int outcome)\n {\n\n // check that original branch is a father of executionbranch:\n require(fSystem.isFatherOfBranch(collateralBranch, branch), \" not a fahter branch\");\n\n // ensure that arbitrator is white-listed\n require(fSystem.isArbitratorWhitelisted(arbitrator, branch), \"arbitrator not white-listed\");\n\n require(fSystem.branchTimestamp(branch) > realityCheck.getFinalizeTS(questionId) - fSystem.WINDOWTIMESPAN(), \"branch is to old\");\n outcome = int(realityCheck.getFinalAnswerIfMatches(questionId, content_hash, arbitrator, minTimeout, minBond));\n }\n\n /// @dev Returns outcome count\n /// @return Outcome count\n function getOutcomeCount()\n public\n view\n returns (uint8)\n {\n return uint8(outcomeTokens.length);\n }\n\n /// @dev Returns outcome tokens array\n /// @return Outcome tokens\n function getOutcomeTokens()\n public\n view\n returns (OutcomeToken[])\n {\n return outcomeTokens;\n }\n\n /// @dev Returns the amount of outcome tokens held by owner\n /// @return Outcome token distribution\n function getOutcomeTokenDistribution(address owner)\n public\n view\n returns (uint[] outcomeTokenDistribution)\n {\n outcomeTokenDistribution = new uint[](outcomeTokens.length);\n for (uint8 i = 0; i < outcomeTokenDistribution.length; i++)\n outcomeTokenDistribution[i] = outcomeTokens[i].balanceOf(owner);\n }\n\n}\n", "sourcePath": "/home/josojo/reality/tokenized-events/contracts/Event.sol", "ast": { "absolutePath": "/home/josojo/reality/tokenized-events/contracts/Event.sol", "exportedSymbols": { "Event": [ 279 ], "EventData": [ 66 ] }, "id": 280, "nodeType": "SourceUnit", "nodes": [ { "id": 1, "literals": [ "solidity", "^", "0.4", ".24" ], "nodeType": "PragmaDirective", "src": "0:24:0" }, { "absolutePath": "@gnosis.pm/pm-contracts/contracts/Tokens/Token.sol", "file": "@gnosis.pm/pm-contracts/contracts/Tokens/Token.sol", "id": 2, "nodeType": "ImportDirective", "scope": 280, "sourceUnit": 2704, "src": "25:60:0", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/josojo/reality/tokenized-events/contracts/OutcomeToken.sol", "file": "./OutcomeToken.sol", "id": 3, "nodeType": "ImportDirective", "scope": 280, "sourceUnit": 1701, "src": "86:28:0", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/home/josojo/reality/tokenized-events/contracts/Proxy.sol", "file": "./Proxy.sol", "id": 4, "nodeType": "ImportDirective", "scope": 280, "sourceUnit": 1734, "src": "115:21:0", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "@josojo/forkonomics-contracts/contracts/ForkonomicToken.sol", "file": "@josojo/forkonomics-contracts/contracts/ForkonomicToken.sol", "id": 5, "nodeType": "ImportDirective", "scope": 280, "sourceUnit": 6227, "src": "137:69:0", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "@realitio/realitio-contracts/truffle/contracts/Realitio.sol", "file": "@realitio/realitio-contracts/truffle/contracts/Realitio.sol", "id": 6, "nodeType": "ImportDirective", "scope": 280, "sourceUnit": 8290, "src": "207:69:0", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 66, "linearizedBaseContracts": [ 66 ], "name": "EventData", "nodeType": "ContractDefinition", "nodes": [ { "anonymous": false, "documentation": null, "id": 12, "name": "OutcomeTokenCreation", "nodeType": "EventDefinition", "parameters": { "id": 11, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 8, "indexed": false, "name": "outcomeToken", "nodeType": "VariableDeclaration", "scope": 12, "src": "362:25:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_OutcomeToken_$1700", "typeString": "contract OutcomeToken" }, "typeName": { "contractScope": null, "id": 7, "name": "OutcomeToken", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 1700, "src": "362:12:0", "typeDescriptions": { "typeIdentifier": "t_contract$_OutcomeToken_$1700", "typeString": "contract OutcomeToken" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 10, "indexed": false, "name": "index", "nodeType": "VariableDeclaration", "scope": 12, "src": "389:11:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" }, "typeName": { "id": 9, "name": "uint8", "nodeType": "ElementaryTypeName", "src": "389:5:0", "typeDescriptions": { "typeIdentifier": "t_uint8", "typeString": "uint8" } }, "value": null, "visibility": "internal" } ], "src": "361:40:0" }, "src": "335:67:0" }, { "anonymous": false, "documentation": null, "id": 18, "name": "OutcomeTokenSetIssuance", "nodeType": "EventDefinition", "parameters": { "id": 17, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 14, "indexed": true, "name": "buyer", "nodeType": "VariableDeclaration", "scope": 18, "src": "437:21:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 13, "name": "address", "nodeType": "ElementaryTypeName", "src": "437:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 16, "indexed": false, "name": "collateralTokenCount", "nodeType": "VariableDeclaration", "scope": 18, "src": "460:25:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 15, "name": "uint", "nodeType": "ElementaryTypeName", "src": "460:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "436:50:0" }, "src": "407:80:0" }, { "anonymous": false, "documentation": null, "id": 24, "name": "OutcomeTokenSetRevocation", "nodeType": "EventDefinition", "parameters": { "id": 23, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 20, "indexed": true, "name": "seller", "nodeType": "VariableDeclaration", "scope": 24, "src": "524:22:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 19, "name": "address", "nodeType": "ElementaryTypeName", "src": "524:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 22, "indexed": false, "name": "outcomeTokenCount", "nodeType": "VariableDeclaration", "scope": 24, "src": "548:22:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 21, "name": "uint", "nodeType": "ElementaryTypeName", "src": "548:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "523:48:0" }, "src": "492:80:0" }, { "anonymous": false, "documentation": null, "id": 32, "name": "WinningsRedemption", "nodeType": "EventDefinition", "parameters": { "id": 31, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 26, "indexed": true, "name": "receiver", "nodeType": "VariableDeclaration", "scope": 32, "src": "602:24:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 25, "name": "address", "nodeType": "ElementaryTypeName", "src": "602:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 28, "indexed": false, "name": "winnings", "nodeType": "VariableDeclaration", "scope": 32, "src": "628:13:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 27, "name": "uint", "nodeType": "ElementaryTypeName", "src": "628:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 30, "indexed": false, "name": "branch", "nodeType": "VariableDeclaration", "scope": 32, "src": "643:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 29, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "643:7:0", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "value": null, "visibility": "internal" } ], "src": "601:57:0" }, "src": "577:82:0" }, { "anonymous": false, "documentation": null, "id": 36, "name": "LogB", "nodeType": "EventDefinition", "parameters": { "id": 35, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 34, "indexed": false, "name": "a", "nodeType": "VariableDeclaration", "scope": 36, "src": "675:9:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 33, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "675:7:0", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "value": null, "visibility": "internal" } ], "src": "674:11:0" }, "src": "664:22:0" }, { "constant": false, "id": 39, "name": "outcomeTokens", "nodeType": "VariableDeclaration", "scope": 66, "src": "722:35:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_array$_t_contract$_OutcomeToken_$1700_$dyn_storage", "typeString": "contract OutcomeToken[]" }, "typeName": { "baseType": { "contractScope": null, "id": 37, "name": "OutcomeToken", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 1700, "src": "722:12:0", "typeDescriptions": { "typeIdentifier": "t_contract$_OutcomeToken_$1700", "typeString": "contract OutcomeToken" } }, "id": 38, "length": null, "nodeType": "ArrayTypeName", "src": "722:14:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_contract$_OutcomeToken_$1700_$dyn_storage_ptr", "typeString": "contract OutcomeToken[]" } }, "value": null, "visibility": "public" }, { "constant": false, "id": 41, "name": "forkonomicToken", "nodeType": "VariableDeclaration", "scope": 66, "src": "765:38:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_ForkonomicToken_$6226", "typeString": "contract ForkonomicToken" }, "typeName": { "contractScope": null, "id": 40, "name": "ForkonomicToken", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 6226, "src": "765:15:0", "typeDescriptions": { "typeIdentifier": "t_contract$_ForkonomicToken_$6226", "typeString": "contract ForkonomicToken" } }, "value": null, "visibility": "public" }, { "constant": false, "id": 43, "name": "fSystem", "nodeType": "VariableDeclaration", "scope": 66, "src": "809:31:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_ForkonomicSystem_$5270", "typeString": "contract ForkonomicSystem" }, "typeName": { "contractScope": null, "id": 42, "name": "ForkonomicSystem", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 5270, "src": "809:16:0", "typeDescriptions": { "typeIdentifier": "t_contract