@gnosis.pm/pm-contracts
Version:
Collection of smart contracts for the Gnosis prediction market platform
565 lines (564 loc) • 232 kB
JSON
{
"contractName": "CategoricalEvent",
"abi": [
{
"constant": false,
"inputs": [],
"name": "setOutcome",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "outcome",
"outputs": [
{
"name": "",
"type": "int256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "collateralTokenCount",
"type": "uint256"
}
],
"name": "buyAllOutcomes",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "owner",
"type": "address"
}
],
"name": "getOutcomeTokenDistribution",
"outputs": [
{
"name": "outcomeTokenDistribution",
"type": "uint256[]"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "outcomeTokenCount",
"type": "uint256"
}
],
"name": "sellAllOutcomes",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "oracle",
"outputs": [
{
"name": "",
"type": "address"
}
],
"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": "",
"type": "uint256"
}
],
"name": "outcomeTokens",
"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": "collateralToken",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "isOutcomeSet",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "getOutcomeTokens",
"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": false,
"name": "outcome",
"type": "int256"
}
],
"name": "OutcomeAssignment",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "receiver",
"type": "address"
},
{
"indexed": false,
"name": "winnings",
"type": "uint256"
}
],
"name": "WinningsRedemption",
"type": "event"
},
{
"constant": false,
"inputs": [],
"name": "redeemWinnings",
"outputs": [
{
"name": "winnings",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "getEventHash",
"outputs": [
{
"name": "",
"type": "bytes32"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
}
],
"metadata": "{\"compiler\":{\"version\":\"0.5.6+commit.b259423e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[],\"name\":\"setOutcome\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"outcome\",\"outputs\":[{\"name\":\"\",\"type\":\"int256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"collateralTokenCount\",\"type\":\"uint256\"}],\"name\":\"buyAllOutcomes\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"getOutcomeTokenDistribution\",\"outputs\":[{\"name\":\"outcomeTokenDistribution\",\"type\":\"uint256[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"outcomeTokenCount\",\"type\":\"uint256\"}],\"name\":\"sellAllOutcomes\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"oracle\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"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\":\"\",\"type\":\"uint256\"}],\"name\":\"outcomeTokens\",\"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\":false,\"inputs\":[],\"name\":\"redeemWinnings\",\"outputs\":[{\"name\":\"winnings\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"collateralToken\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOutcomeSet\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getEventHash\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getOutcomeTokens\",\"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\":false,\"name\":\"outcome\",\"type\":\"int256\"}],\"name\":\"OutcomeAssignment\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"winnings\",\"type\":\"uint256\"}],\"name\":\"WinningsRedemption\",\"type\":\"event\"}],\"devdoc\":{\"author\":\"Stefan George - <stefan@gnosis.pm>\",\"methods\":{\"buyAllOutcomes(uint256)\":{\"details\":\"Buys equal number of tokens of all outcomes, exchanging collateral tokens and sets of outcome tokens 1:1\",\"params\":{\"collateralTokenCount\":\"Number of collateral tokens\"}},\"getEventHash()\":{\"details\":\"Calculates and returns event hash\",\"return\":\"Event hash\"},\"getOutcomeCount()\":{\"details\":\"Returns outcome count\",\"return\":\"Outcome count\"},\"getOutcomeTokenDistribution(address)\":{\"details\":\"Returns the amount of outcome tokens held by owner\",\"return\":\"Outcome token distribution\"},\"getOutcomeTokens()\":{\"details\":\"Returns outcome tokens array\",\"return\":\"Outcome tokens\"},\"redeemWinnings()\":{\"details\":\"Exchanges sender's winning outcome tokens for collateral tokens\",\"return\":\"Sender's winnings\"},\"sellAllOutcomes(uint256)\":{\"details\":\"Sells equal number of tokens of all outcomes, exchanging collateral tokens and sets of outcome tokens 1:1\",\"params\":{\"outcomeTokenCount\":\"Number of outcome tokens\"}},\"setOutcome()\":{\"details\":\"Sets winning event outcome\"}},\"title\":\"Categorical event contract - Categorical events resolve to an outcome from a set of outcomes\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/CategoricalEvent.sol\":\"CategoricalEvent\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/CategoricalEvent.sol\":{\"keccak256\":\"0x0d618ff0e76444e82eb38603d60798a2ca697ca0262ef541ed0987503ed493da\",\"urls\":[\"bzzr://a8677480e10d1c369ab348a093598f84d85a51f400d114ece3d1d5055a09267a\"]},\"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/Event.sol\":{\"keccak256\":\"0xdcacfa25145426b5681ad7d8bafb3c117c92a37b7a0175d72a10b42f130fb8c1\",\"urls\":[\"bzzr://bd10fbdb82f0d50866442c9e95317b3176c8ee067def27d764529973fb36420a\"]},\"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Oracles/Oracle.sol\":{\"keccak256\":\"0xf4d12f4a59c17e66dfa6791188f621a8914e2038a4e3f72d6fc9fb903ca8e18e\",\"urls\":[\"bzzr://a477ccd203e677cc904b1a4f8fcc85251c5b5e09c5c10eed27e01318584b16d1\"]},\"/home/alan/src/github.com/gnosis/pm-contracts/contracts/Tokens/OutcomeToken.sol\":{\"keccak256\":\"0x3d4c9ec14a60cf7577d366da5116e919a4331da8d6d993174f7d599f84ae74e0\",\"urls\":[\"bzzr://20f87450259a3af24ff1769faa9ab3b714d01921e9d8fa4efa75a0c277837a8a\"]},\"@gnosis.pm/util-contracts/contracts/Proxy.sol\":{\"keccak256\":\"0xeab0e83a9ec9e7f052c0455a11577061ec6d1994db08dae429abd6faaabf6555\",\"urls\":[\"bzzr://b2c1273d4ec30e2f9e768eea8c510f8493a7359b03e01923d93eea86b57ec145\"]},\"openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x4ccf2d7b51873db1ccfd54ca2adae5eac3b184f9699911ed4490438419f1c690\",\"urls\":[\"bzzr://1604f5b6d6e916c154efd8c6720cda069e5ba32dfa0a9dedf2b42e5b02d07f89\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0x852793a3c2f86d336a683b30d688ec3dcfc57451af5a2bf5975cda3b7191a901\",\"urls\":[\"bzzr://07fb42206812a17c1f71e548cfa5cec6f9aa1ae0ca5df870718ca4aa9759d1a5\"]},\"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x90e8c2521653bbb1768b05889c5760031e688d9cd361f167489b89215e201b95\",\"urls\":[\"bzzr://aa8b45b57edafc3d67bc5d916327ea16807fae33f753ca163ae0c4061b789766\"]}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b506111a8806100206000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c80638abe59ea1161008c578063b2016bd411610066578063b2016bd414610350578063ccdf68f31461039a578063e96e5950146103bc578063f21a1468146103da576100ea565b80638abe59ea1461027a578063a619486e146102e8578063ad0b2bec14610332576100ea565b806369c19d4c116100c857806369c19d4c146101455780636fb1edcd146101de5780637dc0d1d01461020c5780637dc8f08614610256576100ea565b80630537665d146100ef57806327793f87146100f957806328da850b14610117575b600080fd5b6100f7610439565b005b6101016105fd565b6040518082815260200191505060405180910390f35b6101436004803603602081101561012d57600080fd5b8101908080359060200190929190505050610603565b005b6101876004803603602081101561015b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610872565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156101ca5780820151818401526020810190506101af565b505050509050019250505060405180910390f35b61020a600480360360208110156101f457600080fd5b81019080803590602001909291905050506109dd565b005b610214610c18565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61025e610c3e565b604051808260ff1660ff16815260200191505060405180910390f35b6102a66004803603602081101561029057600080fd5b8101908080359060200190929190505050610c4b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f0610c87565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61033a610cac565b6040518082815260200191505060405180910390f35b610358610fd0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103a2610ff6565b604051808215151515815260200191505060405180910390f35b6103c4611009565b6040518082815260200191505060405180910390f35b6103e26110ee565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561042557808201518184015260208101905061040a565b505050509050019250505060405180910390f35b600260149054906101000a900460ff161580156104f55750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ccdf68f36040518163ffffffff1660e01b815260040160206040518083038186803b1580156104b957600080fd5b505afa1580156104cd573d6000803e3d6000fd5b505050506040513d60208110156104e357600080fd5b81019080805190602001909291905050505b6104fe57600080fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637e7e4b476040518163ffffffff1660e01b815260040160206040518083038186803b15801561056657600080fd5b505afa15801561057a573d6000803e3d6000fd5b505050506040513d602081101561059057600080fd5b81019080805190602001909291905050506003819055506001600260146101000a81548160ff0219169083151502179055507fb1aaa9f4484acc283375c8e495a44766e4026170797dc9280b4ae2ab5632fb716003546040518082815260200191505060405180910390a1565b60035481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330846040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b1580156106e057600080fd5b505af11580156106f4573d6000803e3d6000fd5b505050506040513d602081101561070a57600080fd5b810190808051906020019092919050505061072457600080fd5b60008090505b6004805490508160ff1610156108205760048160ff168154811061074a57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663867904b433846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b1580156107fb57600080fd5b505af115801561080f573d6000803e3d6000fd5b50505050808060010191505061072a565b503373ffffffffffffffffffffffffffffffffffffffff167fad2a02292986148558019ae4abf172732228e32e131a91d3fa7e0cada61932c0826040518082815260200191505060405180910390a250565b60606004805490506040519080825280602002602001820160405280156108a85781602001602082028038833980820191505090505b50905060008090505b81518160ff1610156109d75760048160ff16815481106108cd57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231846040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561097457600080fd5b505afa158015610988573d6000803e3d6000fd5b505050506040513d602081101561099e57600080fd5b8101908080519060200190929190505050828260ff16815181106109be57fe5b60200260200101818152505080806001019150506108b1565b50919050565b60008090505b6004805490508160ff161015610ad95760048160ff1681548110610a0357fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663eac449d933846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b158015610ab457600080fd5b505af1158015610ac8573d6000803e3d6000fd5b5050505080806001019150506109e3565b50600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610b8357600080fd5b505af1158015610b97573d6000803e3d6000fd5b505050506040513d6020811015610bad57600080fd5b8101908080519060200190929190505050610bc757600080fd5b3373ffffffffffffffffffffffffffffffffffffffff167f7ac9271efd660c24459c447459e46f7366d2b4a692e572f108619d0d7273fcc5826040518082815260200191505060405180910390a250565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600480549050905090565b60048181548110610c5857fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600260149054906101000a900460ff16610cc757600080fd5b600460035481548110610cd657fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610d7d57600080fd5b505afa158015610d91573d6000803e3d6000fd5b505050506040513d6020811015610da757600080fd5b81019080805190602001909291905050509050600460035481548110610dc957fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663eac449d933836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b158015610e7a57600080fd5b505af1158015610e8e573d6000803e3d6000fd5b50505050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610f3b57600080fd5b505af1158015610f4f573d6000803e3d6000fd5b505050506040513d6020811015610f6557600080fd5b8101908080519060200190929190505050610f7f57600080fd5b3373ffffffffffffffffffffffffffffffffffffffff167f2fe921bb50a459800ae7eae7c0124e9e875094a539eb7dc5b3f728017347e0fb826040518082815260200191505060405180910390a290565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600260149054906101000a900460ff1681565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600480549050604051602001808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b81526014018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b8152601401828152602001935050505060405160208183030381529060405280519060200120905090565b6060600480548060200260200160405190810160405280929190818152602001828054801561117257602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311611128575b505050505090509056fea165627a7a723058206667c074809debf52ddab8326478f37c4a12458a0b889a21811cc5144406a1240029",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c80638abe59ea1161008c578063b2016bd411610066578063b2016bd414610350578063ccdf68f31461039a578063e96e5950146103bc578063f21a1468146103da576100ea565b80638abe59ea1461027a578063a619486e146102e8578063ad0b2bec14610332576100ea565b806369c19d4c116100c857806369c19d4c146101455780636fb1edcd146101de5780637dc0d1d01461020c5780637dc8f08614610256576100ea565b80630537665d146100ef57806327793f87146100f957806328da850b14610117575b600080fd5b6100f7610439565b005b6101016105fd565b6040518082815260200191505060405180910390f35b6101436004803603602081101561012d57600080fd5b8101908080359060200190929190505050610603565b005b6101876004803603602081101561015b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610872565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156101ca5780820151818401526020810190506101af565b505050509050019250505060405180910390f35b61020a600480360360208110156101f457600080fd5b81019080803590602001909291905050506109dd565b005b610214610c18565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61025e610c3e565b604051808260ff1660ff16815260200191505060405180910390f35b6102a66004803603602081101561029057600080fd5b8101908080359060200190929190505050610c4b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f0610c87565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61033a610cac565b6040518082815260200191505060405180910390f35b610358610fd0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103a2610ff6565b604051808215151515815260200191505060405180910390f35b6103c4611009565b6040518082815260200191505060405180910390f35b6103e26110ee565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561042557808201518184015260208101905061040a565b505050509050019250505060405180910390f35b600260149054906101000a900460ff161580156104f55750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ccdf68f36040518163ffffffff1660e01b815260040160206040518083038186803b1580156104b957600080fd5b505afa1580156104cd573d6000803e3d6000fd5b505050506040513d60208110156104e357600080fd5b81019080805190602001909291905050505b6104fe57600080fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637e7e4b476040518163ffffffff1660e01b815260040160206040518083038186803b15801561056657600080fd5b505afa15801561057a573d6000803e3d6000fd5b505050506040513d602081101561059057600080fd5b81019080805190602001909291905050506003819055506001600260146101000a81548160ff0219169083151502179055507fb1aaa9f4484acc283375c8e495a44766e4026170797dc9280b4ae2ab5632fb716003546040518082815260200191505060405180910390a1565b60035481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330846040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b1580156106e057600080fd5b505af11580156106f4573d6000803e3d6000fd5b505050506040513d602081101561070a57600080fd5b810190808051906020019092919050505061072457600080fd5b60008090505b6004805490508160ff1610156108205760048160ff168154811061074a57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663867904b433846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b1580156107fb57600080fd5b505af115801561080f573d6000803e3d6000fd5b50505050808060010191505061072a565b503373ffffffffffffffffffffffffffffffffffffffff167fad2a02292986148558019ae4abf172732228e32e131a91d3fa7e0cada61932c0826040518082815260200191505060405180910390a250565b60606004805490506040519080825280602002602001820160405280156108a85781602001602082028038833980820191505090505b50905060008090505b81518160ff1610156109d75760048160ff16815481106108cd57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231846040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561097457600080fd5b505afa158015610988573d6000803e3d6000fd5b505050506040513d602081101561099e57600080fd5b8101908080519060200190929190505050828260ff16815181106109be57fe5b60200260200101818152505080806001019150506108b1565b50919050565b60008090505b6004805490508160ff161015610ad95760048160ff1681548110610a0357fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663eac449d933846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b158015610ab457600080fd5b505af1158015610ac8573d6000803e3d6000fd5b5050505080806001019150506109e3565b50600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610b8357600080fd5b505af1158015610b97573d6000803e3d6000fd5b505050506040513d6020811015610bad57600080fd5b8101908080519060200190929190505050610bc757600080fd5b3373ffffffffffffffffffffffffffffffffffffffff167f7ac9271efd660c24459c447459e46f7366d2b4a692e572f108619d0d7273fcc5826040518082815260200191505060405180910390a250565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600480549050905090565b60048181548110610c5857fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600260149054906101000a900460ff16610cc757600080fd5b600460035481548110610cd657fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610d7d57600080fd5b505afa158015610d91573d6000803e3d6000fd5b505050506040513d6020811015610da757600080fd5b81019080805190602001909291905050509050600460035481548110610dc957fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663eac449d933836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b158015610e7a57600080fd5b505af1158015610e8e573d6000803e3d6000fd5b50505050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610f3b57600080fd5b505af1158015610f4f573d6000803e3d6000fd5b505050506040513d6020811015610f6557600080fd5b8101908080519060200190929190505050610f7f57600080fd5b3373ffffffffffffffffffffffffffffffffffffffff167f2fe921bb50a459800ae7eae7c0124e9e875094a539eb7dc5b3f728017347e0fb826040518082815260200191505060405180910390a290565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600260149054906101000a900460ff1681565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600480549050604051602001808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b81526014018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b8152601401828152602001935050505060405160208183030381529060405280519060200120905090565b6060600480548060200260200160405190810160405280929190818152602001828054801561117257602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311611128575b505050505090509056fea165627a7a723058206667c074809debf52ddab8326478f37c4a12458a0b889a21811cc5144406a1240029",
"sourceMap": "1312:981:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1312:981:0;;;;;;;",
"deployedSourceMap": "1312:981:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1312:981:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2361:328:1;;;:::i;:::-;;748:18;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1206:475;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1206:475:1;;;;;;;;;;;;;;;;;:::i;:::-;;3223:362;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3223:362:1;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;3223:362:1;;;;;;;;;;;;;;;;;1864:451;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1864:451:1;;;;;;;;;;;;;;;;;:::i;:::-;;692:20;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;2760:134;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;772:35;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;772:35:1;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;205:25:29;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;1514:517:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;658:28:1;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;718:24;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;2111:180:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;2973:137:1;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;2973:137:1;;;;;;;;;;;;;;;;;2361:328;2504:12;;;;;;;;;;;2503:13;:38;;;;;2520:6;;;;;;;;;;;:19;;;:21;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2520:21:1;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2520:21:1;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2520:21:1;;;;;;;;;;;;;;;;2503:38;2495:47;;;;;;2593:6;;;;;;;;;;;:17;;;:19;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2593:19:1;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2593:19:1;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2593:19:1;;;;;;;;;;;;;;;;2583:7;:29;;;;2637:4;2622:12;;:19;;;;;;;;;;;;;;;;;;2656:26;2674:7;;2656:26;;;;;;;;;;;;;;;;;;2361:328::o;748:18::-;;;;:::o;1206:475::-;1351:15;;;;;;;;;;;:28;;;1380:10;1400:4;1407:20;1351:77;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1351:77:1;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1351:77:1;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1351:77:1;;;;;;;;;;;;;;;;1343:86;;;;;;1490:7;1500:1;1490:11;;1485:117;1507:13;:20;;;;1503:1;:24;;;1485:117;;;1546:13;1560:1;1546:16;;;;;;;;;;;;;;;;;;;;;;;;;;;:22;;;1569:10;1581:20;1546:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1546:56:1;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1546:56:1;;;;1529:3;;;;;;;1485:117;;;;1641:10;1617:57;;;1653:20;1617:57;;;;;;;;;;;;;;;;;;1206:475;:::o;3223:362::-;3320:38;3412:13;:20;;;;3401:32;;;;;;;;;;;;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;148:4;140:6;136:17;126:27;;0:157;3401:32:1;;;;3374:59;;3448:7;3458:1;3448:11;;3443:135;3465:24;:31;3461:1;:35;;;3443:135;;;3545:13;3559:1;3545:16;;;;;;;;;;;;;;;;;;;;;;;;;;;:26;;;3572:5;3545:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3545:33:1;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3545:33:1;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3545:33:1;;;;;;;;;;;;;;;;3515:24;3540:1;3515:27;;;;;;;;;;;;;;;:63;;;;;3498:3;;;;;;;3443:135;;;;3223:362;;;:::o;1864:451::-;2005:7;2015:1;2005:11;;2000:115;2022:13;:20;;;;2018:1;:24;;;2000:115;;;2061:13;2075:1;2061:16;;;;;;;;;;;;;;;;;;;;;;;;;;;:23;;;2085:10;2097:17;2061:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2061:54:1;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2061:54:1;;;;2044:3;;;;;;;2000:115;;;;2181:15;;;;;;;;;;;:24;;;2206:10;2218:17;2181:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2181:55:1;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2181:55:1;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2181:55:1;;;;;;;;;;;;;;;;2173:64;;;;;;2278:10;2252:56;;;2290:17;2252:56;;;;;;;;;;;;;;;;;;1864:451;:::o;692:20::-;;;;;;;;;;;;;:::o;2760:134::-;2832:5;2866:13;:20;;;;2853:34;;2760:134;:::o;772:35::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;205:25:29:-;;;;;;;;;;;;;:::o;1514:517:0:-;1572:13;1650:12;;;;;;;;;;;1642:21;;;;;;1714:13;1733:7;;1714:28;;;;;;;;;;;;;;;;;;;;;;;;;:38;;;1753:10;1714:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1714:50:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1714:50:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1714:50:0;;;;;;;;;;;;;;;;1703:61;;1820:13;1839:7;;1820:28;;;;;;;;;;;;;;;;;;;;;;;;;:35;;;1856:10;1868:8;1820:57;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1820:57:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1820:57:0;;;;1922:15;;;;;;;;;;;:24;;;1947:10;1959:8;1922:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1922:46:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1922:46:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1922:46:0;;;;;;;;;;;;;;;;1914:55;;;;;;2003:10;1984:40;;;2015:8;1984:40;;;;;;;;;;;;;;;;;;1514:517;:::o;658:28:1:-;;;;;;;;;;;;;:::o;718:24::-;;;;;;;;;;;;;:::o;2111:180:0:-;2180:7;2237:15;;;;;;;;;;;2254:6;;;;;;;;;;;2262:13;:20;;;;2220:63;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;2220:63:0;;;2210:74;;;;;;2203:81;;2111:180;:::o;2973:137:1:-;3046:21;3090:13;3083:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2973:137;:::o",
"source": "pragma solidity ^0.5.0;\nimport \"../Events/Event.sol\";\nimport \"@gnosis.pm/util-contracts/contracts/Proxy.sol\";\n\n\ncontract CategoricalEventProxy is Proxy, EventData {\n\n /// @dev Contract constructor validates and sets basic event properties\n /// @param _collateralToken Tokens used as collateral in exchange for outcome tokens\n /// @param _oracle Oracle contract used to resolve the event\n /// @param outcomeCount Number of event outcomes\n constructor(address proxied, address outcomeTokenMasterCopy, ERC20 _collateralToken, Oracle _oracle, uint8 outcomeCount)\n Proxy(proxied)\n public\n {\n // Validate input\n require(address(_collateralToken) != address(0) && address(_oracle) != address(0) && outcomeCount >= 2);\n collateralToken = _collateralToken;\n oracle = _oracle;\n // Create an outcome token for each outcome\n for (uint8 i = 0; i < outcomeCount; i++) {\n OutcomeToken outcomeToken = OutcomeToken(address(new OutcomeTokenProxy(outcomeTokenMasterCopy)));\n outcomeTokens.push(outcomeToken);\n emit OutcomeTokenCreation(outcomeToken, i);\n }\n }\n}\n\n/// @title Categorical event contract - Categorical events resolve to an outcome from a set of outcomes\n/// @author Stefan George - <stefan@gnosis.pm>\ncontract CategoricalEvent is Proxied, Event {\n\n /*\n * Public functions\n */\n /// @dev Exchanges sender's winning outcome tokens for collateral tokens\n /// @return Sender's winnings\n function redeemWinnings()\n public\n returns (uint winnings)\n {\n // Winning outcome has to be set\n require(isOutcomeSet);\n // Calculate winnings\n winnings = outcomeTokens[uint(outcome)].balanceOf(msg.sender);\n // Revoke tokens from winning outcome\n outcomeTokens[uint(outcome)].revoke(msg.sender, winnings);\n // Payout winnings\n require(collateralToken.transfer(msg.sender, winnings));\n emit WinningsRedemption(msg.sender, winnings);\n }\n\n /// @dev Calculates and returns event hash\n /// @return Event hash\n function getEventHash()\n public\n view\n returns (bytes32)\n {\n return keccak256(abi.encodePacked(collateralToken, oracle, outcomeTokens.length));\n }\n}\n",
"sourcePath": "/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/CategoricalEvent.sol",
"ast": {
"absolutePath": "/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/CategoricalEvent.sol",
"exportedSymbols": {
"CategoricalEvent": [
158
],
"CategoricalEventProxy": [
89
]
},
"id": 159,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1,
"literals": [
"solidity",
"^",
"0.5",
".0"
],
"nodeType": "PragmaDirective",
"src": "0:23:0"
},
{
"absolutePath": "/home/alan/src/github.com/gnosis/pm-contracts/contracts/Events/Event.sol",
"file": "../Events/Event.sol",
"id": 2,
"nodeType": "ImportDirective",
"scope": 159,
"sourceUnit": 393,
"src": "24:29:0",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "@gnosis.pm/util-contracts/contracts/Proxy.sol",
"file": "@gnosis.pm/util-contracts/contracts/Proxy.sol",
"id": 3,
"nodeType": "ImportDirective",
"scope": 159,
"sourceUnit": 6829,
"src": "54:55:0",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 4,
"name": "Proxy",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 6828,
"src": "146:5:0",
"typeDescriptions": {
"typeIdentifier": "t_contract$_Proxy_$6828",
"typeString": "contract Proxy"
}
},
"id": 5,
"nodeType": "InheritanceSpecifier",
"src": "146:5:0"
},
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 6,
"name": "EventData",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 204,
"src": "153:9:0",
"typeDescriptions": {
"typeIdentifier": "t_contract$_EventData_$204",
"typeString": "contract EventData"
}
},
"id": 7,
"nodeType": "InheritanceSpecifier",
"src": "153:9:0"
}
],
"contractDependencies": [
204,
5721,
6798,
6828
],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 89,
"linearizedBaseContracts": [
89,
204,
6828,
6798
],
"name": "CategoricalEventProxy",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 87,
"nodeType": "Block",
"src": "616:541:0",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 42,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 38,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 30,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 25,
"name": "_collateralToken",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 13,
"src": "668:16:0",
"typeDescriptions": {
"typeIdentifier": "t_contract$_ERC20_$7778",
"typeString": "contract ERC20"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_contract$_ERC20_$7778",
"typeString": "contract ERC20"
}
],
"id": 24,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "660:7:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": "address"
},
"id": 26,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "660:25:0",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "!=",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"hexValue": "30",
"id": 28,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "697:1:0",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
}
],
"id": 27,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "689:7:0",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_address_$",
"typeString": "type(address)"
},
"typeName": "address"
},
"id": 29,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "typeConversion",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "689:10:0",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
"src": "660:39:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "&&",
"rightExpression": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 37,
"isConstant": false,